This file contains hidden or 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
| <UIAlertViewDelegate> | |
| #pragma mark - UIAlertViewDelegate | |
| - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex | |
| { | |
| if (buttonIndex == 1) { | |
| NSTimeInterval postponTime; | |
| [[[LocalNotification alloc] init] setLocalNotificationWithMessage:self.localNotification.alertBody | |
| fireDate:[NSDate dateWithTimeInterval:postponTime sinceDate:self.localNotification.fireDate] |
This file contains hidden or 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
| #ifndef _OBJC_NSOBJCRUNTIME_H_ | |
| #define _OBJC_NSOBJCRUNTIME_H_ | |
| #include <TargetConditionals.h> | |
| #include <objc/objc.h> | |
| #if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64 | |
| typedef long NSInteger; | |
| typedef unsigned long NSUInteger; | |
| #else |
This file contains hidden or 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
| NSCalendar *usersCalendar = [[NSLocale currentLocale] objectForKey:NSLocaleCalendar]; | |
| NSCalendar *currentCalendar = [NSCalendar currentCalendar]; | |
| NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; //NSCalendarIdentifierGregorian |
This file contains hidden or 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.managedObjectContext deleteObject:fetchDataArray[indexPath.row]]; | |
| [self.managedObjectContext save:nil]; | |
| fetchDataArray = [self.managedObjectContext executeFetchRequest:fetchRequest error:nil]; //reload data |
This file contains hidden or 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
| - dateByAddingTimeInterval: |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <title> Delete </title> | |
| </head> | |
| <body> | |
| <a href = "./index.html"> Home </a> | |
| <a href = "./create.html"> Create </a> | |
| <a href = "./read.php"> Read </a> |
This file contains hidden or 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
| @interface RootTableViewController : UITableViewController <delegation1, delegation2> | |
| ... | |
| @end |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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
| 關於UIWindow、UINavigationController和UITabBarController我把他們都理解成一個容器,並不用於真正顯示內容,它們之前可以嵌套比如這樣:: | |
| UIWindow > UITabBarController > UINavigationController > UIViewController真正顯示內容的是UIViewController | |
| 1. UIWindow 如果是一個Chrome瀏覽器的窗口,那麼其他幾個可以這樣理解 | |
| 2. UITabBarController 是Chrome的Tab欄 | |
| 3. UINavigationController 是Chrome的歷史記錄功能 | |
| 4. UIViewController 是Chrome顯示網頁區域 | |
| 一個Chrome窗口可以有多個Tab, Tab下只有一個顯示網頁的區域,因為保存有歷史記錄,所以可以在之前打開的頁面間切換 |
This file contains hidden or 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
| - (void)viewWillDisappear:(BOOL)animated | |
| { | |
| [super viewWillDisappear:animated]; | |
| if ([self.navigationController.viewControllers indexOfObject:self] == NSNotFound) { | |
| // back button was pressed. We know this is true because self is no longer in the navigation stack. | |
| NSLog(@"[self.navigationController.viewControllers indexOfObject:self] == NSNotFound"); | |
| } | |
| } |
OlderNewer