raulzito234

A nerd blog about cs

Month: September, 2013

Detecting iPhone versus iPad


if([deviceType isEqualToString:@"iPhone Simulator"] || [deviceType isEqualToString:@"iPhone"])

{

NSLog(@"É iPhone seu viado!");

NSLog(@"%@", deviceType);

}

else {

NSLog(@"é iPad seu baitola");

NSLog(@"%@", deviceType);

// Movie explaining what to do!

NSString *stringPath = [[NSBundle mainBundle] pathForResource:@"Scan" ofType:@"MOV"];

NSURL *url = [NSURL fileURLWithPath:stringPath];

mpc = [[MPMoviePlayerController alloc]initWithContentURL:url];

[mpc.view setFrame:CGRectMake(40, 100, 310, 310)];

[mpc setRepeatMode:MPMovieRepeatModeOne];

[mpc setScalingMode:MPMovieScalingModeAspectFill];

[[self view]addSubview:mpc.view];

[mpc prepareToPlay];

[mpc play];

mpc.view.backgroundColor = [UIColor grayColor];

[mpc setControlStyle:MPMovieControlStyleNone];

[self.view addSubview:mpc.view];

}
Advertisements

Deploying app to Iphone 5.

When building (or archiving) an app to the IPhone (Need to choose the target) it’s necessary to remove the armv7s on the building info. Then you should archive the app.

When building to the simulator, then add again the armv7s.