ios扩展的一些知识点

ios扩展的一些知识点

by 伍雪颖

- (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];
		});
	}



ios扩展的一些知识点,,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。