Posts

Showing posts from 2014

Remove extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7

Just do the following steps YouStoryboard.storyboard > YouViewController > Attributes inspector > Uncheck - Adjust scroll view insets.

How to pushViewController with grow up animation

Just add this code to your file. @implementation UINavigationController (Dummy) -( void )enlarge:( UIViewController *)controller fromView:( UIView *)view animated:( BOOL )animated {     UIImageView *imageV=[ self takeSnapshot :controller];     CGRect sourceFrame=view. frame ;     CGRect destFrame=controller. view . frame ;     [imageV setFrame :sourceFrame];     [ self . view addSubview :imageV];          [ UIView animateWithDuration : 0.3 animations :^{         [imageV setFrame :destFrame];     } completion :^( BOOL finished) {         [ self pushViewController :controller animated : NO ];         [imageV removeFromSuperview ];     }]; } -( UIImageView *)takeSnapshot:( UIViewController *)controller {          UIGraphicsBeginImageContext ( self . vie...

Checking Device Info in ios

#include <sys/types.h> #include <sys/sysctl.h> - (NSString *)machineInfo { NSString *device; size_t size; sysctlbyname("hw.machine", NULL, &size, NULL, 0); char *name = malloc(size); sysctlbyname("hw.machine", name, &size, NULL, 0); device = [NSString stringWithUTF8String:name]; free(name); return device; }