- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator { if (coordinator) { }else { } } 导航显示内容: - (void)widgetPerformUpdateWithCompletionHandler:(Void) (^)(NCUpdateResult))completionHandler { [self getPosts:^(BOOL didUpdate) { }]; } 系统分享功能: self.audienceConfigurationItem.tapHandler = ^{ ShareViewController *strongSelf = weakSelf; if (strongSelf) { AudiencePickerViewController *audiencePicker = [[AudiencePickerViewController alloc] init]; audiencePicker.delegate = strongSelf; audiencePicker.selectedAudience = strongSelf.audience; [strongSelf pushConfigurationViewController:audiencePicker]; } } - (void)AudiencePickerViewController:(AudiencePickerViewController *) audiencePickerViewController didSelectAudience:(NSString *)audience { self.audience = audience; self.audienceConfigurationItem.value = self.audience; double delayInSeconds = 0.4; dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW,delayInSeconds * NSEC_PER_SEC); dispatch_after(popTime,disptach_get_main_queue(),^(void) { [self popConfigurationViewController]; }); }
原文地址:http://blog.csdn.net/rainlesvio/article/details/38147181