
ioscodesnippet.com is a collection of self contained inspiring little pieces on iOS development. Most code snippets here can be installed easily through our public ioscodesnippet / Spec CocoaPods custom repo.
There's something new here:
To configure the ioscodesnippet custom repo, run this once.
$ pod repo add ioscodesnippet https://github.com/ioscodesnippet/Specs.git
Create a Podfile for your project.
$ edit Podfile
platform :ios, '6.0'
pod 'UIView-JTViewToImage', '~> 0.0.1'
pod 'UIImage-JTColor'
Remove and add the lines you needed in your Podfile, then you can run:
$ pod install
You'll be instructed to open the project with yourproject.xcworkspace.
Learn more, or you can browse our original usage guide.
If you like this page, you can follow us to keep track of our updates!
UINibDecoderProxy
Observes what's encoded in an NSCoder object
JTKeyValueObserver
Revisiting KVO+Block, the simplest version.
MethodSwizzle
Method Swizzling in Objective-C
UITableViewDeleteActionResponder Quick hack to enable delete menu item in UITableView menuController
UIApplicationAddition Quickly switch supported UIInterfaceOrientation for your View Controllers
JTTargetActionBlock
Adding Block support for UIControl's Target-Action mechanism
NSArray-JTArraySplit Splitting an array to several components
UIImage+JTImageDecode Force decompressing UIImage in background to achieve better performance
UINavigationBar-JTDropShadow Adding drop shadow on UINavigationBar (before iOS 6)
UIImage-JTImageCrop Crop an image in specific rect
UIView+JTRemoveAnimated Adding fadeout effect to any -[UIViews removeFromSuperview]
JTStringAddition NSStringf. Simpler printf styled +[NSString stringWithFormat:]
UIView-JTViewToImage
Rendering any UIViews into UIImage in one line (updated with iOS 7 support)
NSObject-JTNibLoader
Loading a Nib file programmatically using NSObject category
UIImage-JTColor
Creating a placeholder UIImage dynamically with color
NSObject-JTCancelableScheduledBlock
Cancelable Scheduled Blocks in Objective-C