把NavigationBar设置成透明的
[self.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
[self.navigationBar setShadowImage:[UIImage new]];
self.navigationController.navigationBar.translucent = YES;
NavigationBar设置颜色
[self.navigationController.navigationBar setBarTintColor:[UIColor whiteColor]];
[self.navigationController.navigationBar setTintColor:[UIColor whiteColor]];
self.navigationController.navigationBar.translucent = YES;
对与一些带国际化的项目,需要在info.plist文件中添加Localization native development region string china
xib 拉进代码的NSLayoutConstraint属性需要 用.constant来赋值才有效果
AFNetworking 获取http状态码 需要用NSError 获取
NSString* ErrorResponse = [[NSString alloc] initWithData:(NSData *)error.userInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] encoding:NSUTF8StringEncoding];
NSLog(@"%@",ErrorResponse);
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:[ErrorResponse dataUsingEncoding:NSUTF8StringEncoding] options:0 error:NULL];
网友评论