//發佈一條通知
[[NSNotificationCenter defaultCenter] postNotificationName:@"myNotification" object:self.value];
//註冊成爲監聽者
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(showOutput:) name:@"myNotification"object:nil];
//發佈一條通知
[[NSNotificationCenter defaultCenter] postNotificationName:@"myNotification" object:self.value];
//註冊成爲監聽者
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(showOutput:) name:@"myNotification"object:nil];
-(NSString *)dataFilePath//用來返回數據文件的完整路徑名 { NSArray *path = NSSearchPa
使用navigationItem時,首先要確保UINavigationController視圖已經加載到ViewController中。其代碼爲: