Windows 无法自动将 IP 协议堆栈绑定到网络适配器

自从卸载了“猎豹免费WIFI”后,我的windows系统就一直提示连接受限制,能连接WIFI路由器,但是拿不到IP,连不上网了。浪费了整整半天的时间,总算找到了解决方法。 回头想想,真替国人的软件感到羞耻!

PS:windows 10依然不太好用。

Alt none

Alt none

解决方案 去除Liebao WiFI NAT Driver

Alt none

iOS Application Status and Transitions

Alt none ref: iOS Programming 4th edition

iOS 线程安全的单例

+ (instancetype)sharedStore {
    static OBJ *sharedObj = nil;
    
    // Not thread safe
    /*if (!sharedStore) {
        sharedStore = [[self alloc]initPrivate];
    }*/
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedObj = [[self alloc] initPrivate];
    });
    
    return  sharedStore;
}


- (instancetype)initPrivate {
    self = [super init];
    if (self) {
        //do some initialize
    }
    return self;
}

- (instancetype) init {
    @throw [NSException exceptionWithName:@"Singleton" reason:@"PLS use +[OBJ sharedObj]" userInfo:nil];
    return nil;
}

iPad Modal View 样式

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:aRootViewController];
navController.modalPresentationStyle = UIModalPresentationFormSheet;

//navController.modalPresentationStyle = UIModalPresentationPageSheet;

[self presentViewController:navController animation:YES completion:nil];

iOS Frame vs Bounds

Alt none

一篇很不错的的文章,建议大家移步阅读: iOS开发之窗口和视图