ios修改textField的placeholder的字体颜色、大小
textField.placeholder = @"username is in here!";
[textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
导航栏隐藏但是上面有按钮
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]];
AFNetworking
默认接收 json 格式的响应(因为这是在 iOS 平台上的框架,一般不需要 text/html),如果想要返回 html,需要设置 acceptableContentTypes
http://www.tuicool.com/articles/rmURJbB
设置AFNetworking的请求头:
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.requestSerializer = [AFHTTPRequestSerializer serializer];
[manager.requestSerializer setValue:@"Dalvik/1.6.0 (Linux; U; Android 4.3; R6007 Build/JLS36C) Paros/3.2.13" forHTTPHeaderField:@"User-Agent"];
[manager.requestSerializer setValue:@"api.miaotu.net" forHTTPHeaderField:@"Host"];
[manager.requestSerializer setValue:@"Keep-Alive" forHTTPHeaderField:@"Connection"];
富文本
NSMuttableAttstring
http://blog.csdn.net/reylen/article/details/41208747
Masonry自动布局详解七:ScrollView循环布局
http://blog.csdn.net/woaifen3344/article/details/50114595
确定tableviewcell中的button在tableview的第几行
//在设置的Button的selector的方法中如下设置:
- (void)pressed:(id)sender {
UITableViewCell * cell = (UITableViewCell *)[[sender superview] superview];
NSIndexPath * path = [self.tableView indexPathForCell:cell];
NSLog(@"index row%d", [path row]);
//NSLog(@"view:%@", [[[sender superview] superview] description]);
}
- (void)pressed:(id)sender; //方法是我设置的button的selector
UITextView的placeholder
http://www.cnblogs.com/easonoutlook/archive/2012/12/28/2837665.html