08 2014 档案

iOS 判断scrollView是否滑动到底部
摘要:判断scrollView有没有滚动到视图的底部,用来判断下拉刷新的时间。等 - (void)scrollViewDidScroll:(UIScrollView *)scrollView1 { CGPoint offset = scrollView1.contentOffset; ... 阅读全文

posted @ 2014-08-05 11:12 给me一首歌的时间 阅读(716) 评论(0) 推荐(0)

iOS 将一个UIImage缩放到指定Size
摘要:这方法挺实用的,直接调用就可以得到想要的size。//将一个UIImage缩放变换到指定Size-(UIImage*) OriginImage:(UIImage *)image scaleToSize:(CGSize)size{ UIGraphicsBeginImageContext(size);... 阅读全文

posted @ 2014-08-05 11:08 给me一首歌的时间 阅读(238) 评论(0) 推荐(0)

iOS 判断两个日期之间的间隔
摘要:两个时间段,判断之间的相差,做一些时间范围限制使用 NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyyMMddHHmmss"]; NSDate... 阅读全文

posted @ 2014-08-05 11:05 给me一首歌的时间 阅读(505) 评论(0) 推荐(0)

iOS UITextField设置placeholder颜色
摘要:设置UITextField的placeholder颜色 UIColor *color = [UIColor blackColor]; textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"密码"... 阅读全文

posted @ 2014-08-05 11:03 给me一首歌的时间 阅读(218) 评论(0) 推荐(0)

iOS 当键盘覆盖textFiled时简单的处理方法
摘要://方法1---- (void)textFieldDidBeginEditing:(UITextField *)textField { if (iPhone5) { return; } else { [UIView beginAnimations:nil context:NUL... 阅读全文

posted @ 2014-08-01 11:34 给me一首歌的时间 阅读(174) 评论(0) 推荐(0)

iOS 点击空白处收回键盘的几个简单代码
摘要://收回键盘1-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ [self.view.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL... 阅读全文

posted @ 2014-08-01 11:31 给me一首歌的时间 阅读(619) 评论(0) 推荐(0)

iOS 字符串和图片互转
摘要:for (UIImage *myImg in _imgArray) { NSData *imageData = UIImageJPEGRepresentation(myImg,0.5); NSString *_encodedImageStr = [imageData base64En... 阅读全文

posted @ 2014-08-01 11:22 给me一首歌的时间 阅读(359) 评论(0) 推荐(0)

iOS 百度地图报私有api的解决方案
摘要:1.Build Settings-->搜索other linker Flags-->将other linker Flags设置为-objc2.用2.1.1的版本的百度地图3.换高德地图 阅读全文

posted @ 2014-08-01 11:21 给me一首歌的时间 阅读(146) 评论(0) 推荐(0)

iOS textFiledView,label自适应高度
摘要:CGSize constraintSize; constraintSize.width = 320; constraintSize.height = MAXFLOAT; CGSize sizeFrame =[infoTextView.text sizeWithFont:infoTextView... 阅读全文

posted @ 2014-08-01 11:13 给me一首歌的时间 阅读(205) 评论(0) 推荐(0)

苹果中国开发者电话
摘要:苹果中国开发者支持中心电话:4006 701 855 阅读全文

posted @ 2014-08-01 11:08 给me一首歌的时间 阅读(319) 评论(0) 推荐(0)

iOS 控制输入框的字数?(textFliedView,textFlied等)
摘要://控制输入框的字数- (void)textViewDidChange:(UITextView *)textView{ NSInteger number = [textView.text length]; if (number > 300) { textView.text = [textV... 阅读全文

posted @ 2014-08-01 11:07 给me一首歌的时间 阅读(155) 评论(0) 推荐(0)

iOS 给view,button,text filed,label等添加边框和颜色
摘要:self.tfaaa.layer.borderWidth = 2;self.tfaaa.layer.borderColor = [UIColor blueColor].CGColor; 阅读全文

posted @ 2014-08-01 11:04 给me一首歌的时间 阅读(217) 评论(0) 推荐(0)

iOS 不允许横屏的简单代码
摘要:- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ return UIInterfaceOrientationMaskP... 阅读全文

posted @ 2014-08-01 11:01 给me一首歌的时间 阅读(171) 评论(0) 推荐(0)

iOS 简单实用的一些宏定义
摘要:#define WDWBaseURL @"http://192.168.1.1/" //字符串#define TOWERTabBarItemTitleOffset UIOffsetMake (0, -3) //点#define WDWFontColor3d3d3d [UIColor colorWit... 阅读全文

posted @ 2014-08-01 10:59 给me一首歌的时间 阅读(105) 评论(0) 推荐(0)

iOS利用AFNetworking(AFN) 实现图片上传
摘要:1.上传图片以二进制流的形式上传1 #pragma mark - 文件上传2 - (IBAction)uploadImage3 {4 /*5 此段代码如果需要修改,可以调整的位置6 7 1. 把upload.php改成网站开发人员告知的地址8 2. 把file改成网站开发人员告知... 阅读全文

posted @ 2014-08-01 10:54 给me一首歌的时间 阅读(7828) 评论(0) 推荐(0)

IOS 根据数组的个数对UIButton进行重复或循环使用
摘要://设置一个viewview = [[UIView alloc] initWithFrame:CGRectMake(0, 38, 320, 30)];view.backgroundColor = [UIColor lightGrayColor];[self.view addSubview:view]... 阅读全文

posted @ 2014-08-01 10:33 给me一首歌的时间 阅读(351) 评论(0) 推荐(0)

iOS App Store网址的命名规则
摘要:App Store 命名规则:https://itunes.apple.com/cn/app/ + 拼音(最多6个,全部小写,空格要-) + /id +appID一些参考实例:http://itunes.apple.com/cn/app/wo-ding/id870417673https://itun... 阅读全文

posted @ 2014-08-01 10:27 给me一首歌的时间 阅读(351) 评论(0) 推荐(0)

iOS popToViewController具体用法
摘要:[self.navigationControllerpopToViewController:[self.navigationController.viewControllersobjectAtIndex:1]animated:YES];或 searchBarViewController *sear... 阅读全文

posted @ 2014-08-01 10:22 给me一首歌的时间 阅读(350) 评论(0) 推荐(0)