GithubHelp home page GithubHelp logo

camdenfullmer / cfsharecircle Goto Github PK

View Code? Open in Web Editor NEW
262.0 17.0 44.0 10.21 MB

CFShareCircle is a user interface component for iOS that can be integrated into an app as a sharing mechanism for any kind of content.

License: MIT License

Ruby 3.77% Objective-C 96.23%

cfsharecircle's Introduction

#CFShareCircle

CFShareCircle is a better way for app developers to let users share the content to many different services. It is a simple UIView that adds drag and share capabilities to a developers application.

###YouTube Video CFShareCircle Demo

##How To Use

Follow the instructions to add CFShareCircle to your project.

###Installation

  1. CFShareCircle can be installed via Cocoapods. Simply add pod 'CFShareCircle' to your Podfile. If you don't use Cocoapods you're welcome to use git submodules, or simply download the files manually. If you go with the manual route just include the files located in Classes and Resources to your project.

  2. Edit your view controller header file to import the CFShareCircle header file and declare the delegation protocol.

    #import "CFShareCircleView.h"
    
    @interface ViewController : UIViewController <CFShareCircleViewDelegate>
    
    @end
    
  3. Declare a property for the CFShareCircle.

    @interface ViewController ()
    
    @property (nonatomic, strong) CFShareCircleView *shareCircleView;
    
    @end
    
  4. In your viewDidLoad method instantiate the CFShareCircle and set your view controller as the delegate.

    - (void)viewDidLoad {
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
        shareCircleView = [[CFShareCircleView alloc] init];
        shareCircleView.delegate = self;
    }
    
  5. Implement the delegate method for the view.

    - (void)shareCircleView:(CFShareCircleView *)shareCircleView didSelectSharer:(CFSharer *)sharer {
        NSLog(@"Selected sharer: %@", sharer.name);
    }
    
    - (void)shareCircleCanceled:(NSNotification *)notification{ 
        NSLog(@"Share circle view was canceled.");
    }
    
  6. Finally, just show the view whenever you want it to pop up for the user.

    [shareCircleView showAnimated:YES];
    

###Customize CFShareCirlce

If you would like to determine what the CFShareCircle view shows, all you have to do is intialize your own array of sharers.

shareCircleView = [[CFShareCircleView alloc] initWithSharers:@[[CFSharer twitter], [CFSharer facebook], [CFSharer dropbox]]];

Then to extend this you can create your own CFSharer objects, just provide your own name for the sharer and image. Note that icons should be 100px by 100px for retina and 50px by 50px for standard.

CFSharer *newSharer = [[CFSharer alloc] initWithName:@"Facebook" imageName:@"facebook.png"];

Types of CFSharers included:

- Evernote
- Twitter
- Google Drive
- Facebook
- Pinterest
- Dropbox
- Camera Roll
- Mail
- AirPrint

##Requirments

- ARC
- iOS 5.0+
- Following Frameworks: UIKit, CoreGraphics and QuartzCore.

##Contact

Twitter

Website

##License The MIT License (MIT) Copyright (c) 2013 Camden Fullmer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cfsharecircle's People

Contributors

camdenfullmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cfsharecircle's Issues

Reduce lag of circle

When testing the share circle, there was a significant slow down in speed on the iPod Touch 4th generation when the circle enters/leaves the screen and also a little when dragging the circle.

Might just be something with animating the keyframes and it doing to much processing.

Profile the circle view

Check for any potential leaks or reduce CPU usage in calculating the positions of the layers.

Allow user to overshoot circle

This would be a nice feature so the user could just swipe in the direction and as long it reaches the sharing service it will launch it.

Landscape problems

When changing orientation to landscape on the phone the view is not placed correctly inside of the view. Some how the frame needs to be changed to allow this to work.

Add a more button

More button would be used to list more services that would not fit inside the circle.

Proper translation of touch region

Right now the touch region is translated perfectly when at the north and south regions of the larger circle. Would be better if it was done correctly on the east and west as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.