https://nickharris.wordpress.com/2016/02/10/uialertcontroller-nsoperation/[......]
Category Archives: iOS
iOS10在前台如何强制发push
UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
content.body = body;
content.userInfo = userInfo;
content.sound = [UNNotificationSound defaultSound];
[content setValue:@(YES) forKeyPath:@"shouldAlwaysAlertWhil[......]
iOS如何支持手势返回
传统做法是在viewcontroller上设置navigationController的interactivePopGesturerecovnezer,但是bug很多,推荐如下,在nav controller上的做法:
class C4MVTNavigationController: UINavigationController {
// MARK: - Property
override var supportedInterfaceOrientations: UIIn[......]
iOS中如何获得UITabBarController中每一个tab的具体frame
传送门:http://stackoverflow.com/questions/6325457/getting-the-frame-of-a-particular-tab-bar-item
我稍微改了一下:
- (CGRect)frameForTabInTabBarWithIndex:(NSUInteger)index
{
NSMutableArray *tabBarItems = [NSMutableArray arrayWithCapacity:[self.tabBar.i[......]
iOS的TNV架构下,实现TabBar不旋转,其他页可选旋转
TNV架构下,部分旋转这个功能,实现起来比较蛋疼,给一个目前的方法。
1、自定义TabBar:
extension C4MVTTabBarController: UITabBarControllerDelegate {
func tabBarControllerSupportedInterfaceOrientations(_ tabBarController: UITabBarController) -> UIInterfaceOrientationMask {[......]