This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView | |
{ | |
return 1; | |
} | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ | |
return [tab count]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation AppDelegate | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
self.window.backgroundColor = [UIColor whiteColor]; | |
self.tabBarController = [[UITabBarController alloc] init]; | |
SquaresViewController *squaresViewController = [[SquaresViewController alloc] initWithNibName:@"SquaresViewController" bundle:nil]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//tab : NSMutableArray | |
tab = [[NSMutableArray alloc]initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"filename" ofType:@"plist"]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// imgV1 is a UIImageView | |
-(IBAction)addImageView:(id)sender | |
{ | |
NSLog(@"add image from repo"); | |
if(imgV1==nil) | |
{ | |
//just @"name" for png , other: @"name.extension" | |
UIImage* img = [UIImage imageNamed:@"image.jpg"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSDictionary* dico=[[NSDictionary alloc]init]; | |
dico = [NSDictionary | |
dictionaryWithObjects:@[@"http://www.google.com/favicon.ico",@"google",@"http://www.google.com"] | |
forKeys:@[@"favicon",@"nom",@"url"]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to push, add in the UIViewController : | |
MyUIViewController *second = [[LoginUIViewController alloc] initWithNibName:nil bundle:nil]; | |
[self presentViewController:second animated:YES completion:nil]; | |
// in the second view controller add | |
[self dismissViewControllerAnimated:YES completion:nil]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wait = new ProgressDialog(this); | |
wait.show(this, « titre", " message "); | |
wait.dismiss(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Background design | |
UIGraphicsBeginImageContext(self.view.frame.size); | |
[[UIImage imageNamed:@"appBackground.png"] drawInRect:self.view.bounds]; | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
self.view.backgroundColor = [UIColor colorWithPatternImage:image]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In plist file : | |
1) add "Fonts provided by application" item in property list | |
2) drag the .ttf or .otf file in supporting file folder | |
Warning ! check case "add target" | |
3) add string item in Fonts provided by application array : example "myFont.ttf" | |
4) in the module : |
OlderNewer