文章分类 -  iOS

去除NsLog()方法的前缀信息
摘要:添加宏定义 #define NSLog(FORMAT, ...) \printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__]UTF8String]); 阅读全文

posted @ 2016-03-18 15:43 Mr_Deng 阅读(300) 评论(0) 推荐(0)

xcode中忽略选择器的警告的方法
摘要:添加以下两句 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warc-performSelector-leaks” 阅读全文

posted @ 2016-03-18 15:43 Mr_Deng 阅读(123) 评论(0) 推荐(0)

解决关于cell重用机制导致数据显示错乱的三种办法
摘要:方法1 将获得cell的方法从- (UITableViewCell*)dequeueReusableCellWithIdentifier:(NSString*)identifier 换为-(UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *) 阅读全文

posted @ 2016-03-18 15:41 Mr_Deng 阅读(959) 评论(0) 推荐(0)

UI中UITextView的基本用法
摘要:原文地址:http://blog.sina.com.cn/s/blog_9693f61a0101aode.html 感谢原作者! //初始化并定义大小 UITextView *textview = [[UITextView alloc] initWithFrame:CGRectMake(20, 10 阅读全文

posted @ 2016-02-27 15:58 Mr_Deng 阅读(153) 评论(0) 推荐(0)

Xcode中修改变量名、类名及字符串的替换操作
摘要:原文地址:http://my.oschina.net/u/2340880/blog/487870 感谢原作者! 在做iOS开发代码优化的工作时,优化代码结构之前,我们应该先整理好工程的外貌,将文件和类的命名进行规范,在Xcode中为我们提供了方便而强大的名称修改功能。 第一步:修改类名 将鼠标点击放 阅读全文

posted @ 2016-02-27 11:06 Mr_Deng 阅读(2483) 评论(0) 推荐(0)

UI中UITableView全面解析(转载)
摘要:本文出处:http://www.cnblogs.com/kenshincui/p/3931948.html 感谢原作者! 概述 在iOS开发中UITableView可以说是使用最广泛的控件,我们平时使用的软件中到处都可以看到它的影子,类似于微信、QQ、新浪微博等软件基本上随处都是UITableVie 阅读全文

posted @ 2016-02-26 10:59 Mr_Deng 阅读(146) 评论(0) 推荐(0)

UI中UIScrollVIew的基本属性和用法
摘要:UIScrollView 类负责所有基于 UIKit 的滚动操作。 一、创建 [java] view plaincopy CGRect bounds = [ [ UIScreen mainScreen ] applicationFrame ] ; UIScrollView* scrollView = 阅读全文

posted @ 2016-02-25 11:27 Mr_Deng 阅读(231) 评论(0) 推荐(0)

UI中UINavigationController导航控制器详解与使用
摘要:本文由http://blog.csdn.net/totogo2010/原创 1、UINavigationController导航控制器如何使用 UINavigationController可以翻译为导航控制器,在iOS里经常用到。 我们看看它的如何使用: 下面的图显示了导航控制器的流程。最左侧是根视 阅读全文

posted @ 2016-02-24 11:41 Mr_Deng 阅读(395) 评论(0) 推荐(0)

UI中实现点击输入框时整个屏幕往上升,解决部分界面被遮盖问题
摘要:当点击输入框准备编辑时调用 animateKeyframesWithDuration 方法 // start time and duration are values between 0.0 and 1.0 specifying time and duration relative to the o 阅读全文

posted @ 2016-02-24 11:36 Mr_Deng 阅读(179) 评论(0) 推荐(0)

UI中改变图片的大小的方法
摘要:-(UIImage*) OriginImage:(UIImage *)image scaleToSize:(CGSize)size{ UIGraphicsBeginImageContext(size); //size 为CGSize类型,即你所需要的图片尺寸 [image drawInRect:CG 阅读全文

posted @ 2016-02-22 16:18 Mr_Deng 阅读(317) 评论(0) 推荐(0)

UI中ViewController的页面跳转和弹出模态
摘要:ViewController 页面跳转 从一个Controller跳转到另一个Controller时,一般有以下2种: 1、利用UINavigationController,调用pushViewController,进行跳转;这种采用压栈和出栈的方式,进行Controller的管理。调用popVie 阅读全文

posted @ 2016-02-18 17:08 Mr_Deng 阅读(1083) 评论(0) 推荐(0)

UI中TextField控件详解
摘要:感谢原作者!原文地址:http://blog.csdn.net/lbuskeep/article/details/28543183 //初始化textfield并设置位置及大小 UITextField *text = [[UITextField alloc]initWithFrame:CGRectM 阅读全文

posted @ 2016-02-18 14:38 Mr_Deng 阅读(726) 评论(0) 推荐(0)

UI中Image图片缩放到自定义大小的方法
摘要://图片缩放的方法 -(UIImage*) OriginImage:(UIImage *)image scaleToSize:(CGSize)size { // 创建一个bitmap的context // 并把它设置成为当前正在使用的context UIGraphicsBeginImageConte 阅读全文

posted @ 2016-02-17 17:51 Mr_Deng 阅读(531) 评论(0) 推荐(0)

OC中@Selector传参总结
摘要:一、一般情况,使用 self performSelector:SEL withObject:id方法 [self performSelectorOnMainThread:@selector(testAA:) withObject:[NSArray arrayWithObjects:@"1",@"2" 阅读全文

posted @ 2016-02-16 20:26 Mr_Deng 阅读(2189) 评论(0) 推荐(0)

UI中UIControlEvent通知事件详解
摘要:UIControl类提供了一个标准机制,来进行事件登记和接收。这令你可以指定你的控件在发生特定事件时,通知代理类的一个方法。如果要注册一个事件,可以使用addTarget方法: [ myControl addTarget: myDelegate action:@selector(myActionme 阅读全文

posted @ 2016-02-16 11:27 Mr_Deng 阅读(1682) 评论(0) 推荐(0)

UI中Button的用法
摘要:第一、UIButton的定义 UIButton *button=[[UIButton buttonWithType:(UIButtonType); 能够定义的button类型有以下6种, typedef enum { UIButtonTypeCustom = 0, 自定义风格 UIButtonTyp 阅读全文

posted @ 2016-02-16 11:08 Mr_Deng 阅读(467) 评论(0) 推荐(0)

UI中Slider的用法
摘要:UIslider滑块控件在IOS开发中会常用到,可用于调节音量,字体大小等UI方面的交互,用法总结如下: 初始化一个滑块: UISlider * slider = [[UISlider alloc]initWithFrame:CGRectMake(0, 0, 100, 100)]; 设置滑块位置 @ 阅读全文

posted @ 2016-02-16 09:42 Mr_Deng 阅读(318) 评论(0) 推荐(0)

UI 中程序的生命周期事件(AppDelegate)
摘要:#import "AppDelegate.h" @interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunching 阅读全文

posted @ 2016-02-15 17:01 Mr_Deng 阅读(219) 评论(0) 推荐(0)

UI 中 Label控件的基本用法
摘要:UILabel * label_ = [UILabel new]; //设置LABEL控件的位置和大小 label_.frame = CGRectMake(50, 50, 200, 50); //设置文本文字 label_.text = @"this is a label.this is a lab 阅读全文

posted @ 2016-02-15 16:57 Mr_Deng 阅读(441) 评论(0) 推荐(0)

OC中NSString字符串操作知识点归纳
摘要:NSString类常用函数大总结 #import main(int argc, const char * argv[]) { @autoreleasepool { NSString *str = @"helloworld"; //求字符串长度 NSInteger len = [str length] 阅读全文

posted @ 2016-01-28 16:05 Mr_Deng 阅读(143) 评论(0) 推荐(0)

导航