A UIButton
subclass which mimics the Twitter follow button and will open the profile of the configured user on whatever Twitter App is currently installed (native Twitter app preferred if installed).
The easiest way is to use CocoaPods. If you don't already, here's a guide.
pod 'CJMTwitterFollowButton', '~>0.1.0'
The CJMTwitterFollowButton
can be created in Interface Builder by adding a UIButton
and changing it's class to CJMTwitterFollowButton
or in code using the initialiser:
CJMTwitterFollowButton *button = [[CJMTwitterFollowButton alloc] initWithOrigin:CGPointMake(135, 125)
twitterAccount:@"chrismaddern"
andSize:CJMButtonSizeSmall];
This is basically several others' work pulled together to create a simple-to-include repo.
Hi-Res Follow Me button created by Joseph DiPaolo: http://www.illustrated-primer.com/blog/2011/06/19/twitter-follow-buttons/
Non-Twitter App Schemes from the Gist Repo: https:gist.github.com/958738 Created by vhbit
Thanks to HandleOpenURL for documenting the Twitter iOS5 Scheme http:handleopenurl.com/scheme/twitter
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Licensed under the MIT License.