Swap and add multiple cell in tableview(JTGesturebased)

https://github.com/jamztang/JTGestureBasedTableViewDemo

http://stackoverflow.com/questions/10346158/manage-swapping-between-two-cells-rather-than-changing-the-nsindexpath-of-other

 

Advertisements

CHECK IOS6 & IOS7 WITH iPhone 4 or 5

=>CGRect screenBounds = [[UIScreen mainScreen] bounds];
if(screenBounds.size.height == 568)
{
//    iPhone 5
}
else
{
//    iPohne 4 and Older iPhones
}

=>CHECK IOS VERSION

 if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
            // > iOS7
            NSLog(@”iOS7″);
            
        } else {
            
            // <= iOS6
            NSLog(@”iOS6″);

        }

 

 

=================CHECK iPHONE or iPAD

=>Check Device iPhone or iPad

//In  AppDelegate.h
int checkDevice;
// In AppDelegate.m
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
checkDevice = 1; //For iphone
}
else
{
checkDevice = 2; //For iPad
}

 

 

 

Xcode 5 simple example

LINK=>

http://www.appcoda.com/hello-world-app-using-xcode-5-xib/

App.h
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end

 

App.m
– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
HelloWorldViewController *viewController = [[HelloWorldViewController alloc] initWithNibName:@”HelloWorldViewController” bundle:nil];
self.window.rootViewController = viewController;

[self.window makeKeyAndVisible];
return YES;
}