Интуит. Разработка приложений для iOS. Лекция 9. Нестандартный интерфейс

  • Published on
    12-May-2015

  • View
    298

  • Download
    9

Embed Size (px)

Transcript

  • 1. iOS 9 gleb34@gmail.com

2. 3. ? 4. ? [str writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 5. , ? 6. , ? NSUserDefaults 7. , Core Data 8. , Core Data NSManagedObjectModel, NSPersistentStoreCoordinator, NSManagedObjectContext 9. , Core Data? 10. , Core Data? NSManagedObject 11. User Core Data? 12. User Core Data? NSManagedObjectContext *context = ...; NSFetchRequest *f = [NSFetchRequest fetchRequestWithEntityName:@"User"]; NSArray *users = [context executeFetchRequest:f error:nil]; 13. Core Data? 14. Core Data? MagicalRecord 15. 16. UIView, , : frame, transform, alpha, backgroundColor 17. ? [UIView animateWithDuration:1 animations:^{ // }]; 18. [UIView animateWithDuration:1 animations:^{ // } completion:^(BOOL finished) { // }]; 19. [UIView animateWithDuration:1 animations:^{ self.smallView.backgroundColor = [UIColor greenColor]; }]; [UIView animateWithDuration:1 animations:^{ self.smallView.frame = CGRectMake(50, 200, 100, 100); }]; 20. [UIView animateWithDuration:1 animations:^{ self.smallView.alpha = 0; }]; [UIView animateWithDuration:1 animations:^{ self.smallView.alpha = 1; }]; 21. [UIView animateWithDuration:1 animations:^{ self.smallView.transform = CGAffineTransformMakeRotation(M_PI); } completion:^(BOOL finished) { [UIView animateWithDuration:1 animations:^{ self.smallView.transform = CGAffineTransformIdentity; }]; }]; 22. 23. UINavigationBar *bar = self.navigationController.navigationBar; bar.barTintColor = [UIColor blueColor]; UIFont *font = [UIFont fontWithName:@"HelveticaNeue-Light" size:19]; bar.titleTextAttributes = @{ NSForegroundColorAttributeName : [UIColor whiteColor], NSFontAttributeName : font}; 24. Appearance id appearance = [UINavigationBar appearance]; [appearance setBarTintColor:[UIColor blueColor]]; , UIFont *font = [UIFont fontWithName:@"HelveticaNeue-Light" size:19]; , NSDictionary *attrs = @{ NSForegroundColorAttributeName : [UIColor whiteColor], NSFontAttributeName : font}; [appearance setTitleTextAttributes:attrs]; 25. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { id appearance = [UILabel appearance]; [appearance setTextColor:[UIColor redColor]]; return YES; } 26. - View controller-based status bar appearance = NO - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { application.statusBarStyle = UIStatusBarStyleLightContent; return YES; } 27. view.layer self.smallView.layer.borderWidth = 3; self.smallView.layer.borderColor = [UIColor redColor].CGColor; self.smallView.layer.cornerRadius = 5; 28. self.smallView.layer.shadowRadius = 5; self.smallView.layer.shadowOpacity = 1; self.smallView.layer.shadowOffset = CGSizeMake(2, 2); 29. UIWindow tintColor 30. 31. Sketch app http://www.bohemiancoding.com/sketch/beta/ 32. PSD PNG 33. https://www.cocoacontrols.com 34. 35. ! gleb34@gmail.comtwitter.com/pilot34

Recommended

View more >