![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IOS学习笔记
文章平均质量分 58
xsyatcs_dn
这个作者很懒,什么都没留下…
展开
-
Class类型, 选择器Selector以及指针函数
我们在实际上的编程过程中,也许会遇到这样的场景,那就是我们在写程序的时候不能确切的知道我们需要使用什么类,使用这个类的什么方法。在这个时候,我们需要在我们的程序里面动态的根据用户的输入来创建我们在写程序不知道的类的对象,并且调用这个对象的实例方法。Objective-C为我们提供了Class类型, 选择器Selector以及指针函数来实现这样的需求,从而大大的提高了我们程序的动态性能。转载 2013-12-14 15:30:21 · 559 阅读 · 0 评论 -
自定义的打印宏
#define DebugLogEnable 1#if DebugLogEnable #define DebugString(format,...) ([NSString stringWithFormat: @" %s %@ ", __FUNCTION__, [NSString stringWithFormat:format, ##__VA_ARGS__]原创 2015-01-07 23:32:04 · 428 阅读 · 0 评论 -
Mac 直连PC共享的一个坑
大家都知道用smb://ip地址,然后会弹窗输入账户和密码,但如果你的mac系统的时间跟pc的系统时间不一致(大概是差超过24小时,没有具体测试过),就会登录不成功,原理我也没搞明白,但改下系统时间就可以解决了,希望能帮助遇到此问题的朋友!原创 2016-03-23 14:07:38 · 2385 阅读 · 0 评论 -
数组乱序
#pragma mark -#pragma mark (NSMutableArray *)randArray:(NSMutableArray *)ary- (NSMutableArray *)randArray:(NSMutableArray *)ary{ NSMutableArray *tmpAry = [NSMutableArray arrayWithArray:ary]; NSUIn转载 2014-06-25 16:42:02 · 519 阅读 · 0 评论 -
boundingRectWithSize:options:attributes:context:里的attributes参数怎么拼接
attributes字典可以s NSString *const NSFontAttributeName;NSString *const NSParagraphStyleAttributeName;NSString *const NSForegroundColorAttributeName;NSString *const NSBackgroundColor原创 2014-04-27 17:56:17 · 512 阅读 · 0 评论 -
ScrollView的常用属性和代理方法说明
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // CGRect *screenBounds = [[UIScreen mainScreen] bounds]; //返回整个屏幕转载 2014-05-05 19:27:35 · 456 阅读 · 0 评论 -
ios获取未知类所有属性和方法
#import @implementation NSObject (XXOOProperty) /* 获取对象的所有属性和属性内容 */ - (NSDictionary *)getAllPropertiesAndVaules { NSMutableDictionary *props = [NSMutableDictionarydictiona转载 2014-02-13 14:29:13 · 491 阅读 · 0 评论 -
自定义Navigationbar,使用Catagory
自定义Navigationbar,使用Catagory方法一:// UINavBar.h#import@interface UINavigationBar (UINavigationBarCategory)UIImageView *bg;-(void)setBackgroundImage:(UIImage*)image;- (void)insertSub转载 2014-01-09 19:10:54 · 567 阅读 · 0 评论 -
动态加载图片
官方的例子(支持3.x以上的机子)http://developer.apple.com/library/ios/#samplecode/LazyTableImages/Introduction/Intro.html 其实在iphone上面是实现图片的动态加载,其实也不是很难,其中只要在代理中实现方法就可以首先在头文件中声明使用到的代理 如 @interfa转载 2014-01-04 12:48:57 · 446 阅读 · 0 评论 -
UIImageView常用操作
UIImage* image = [UIImage imageNamed:@"back2.jpg"]; UIImageView* imageView1 = [[[UIImageView alloc] initWithImage:image] autorelease]; imageView1.frame = CGRectMake(0, 0, 300, 200);转载 2013-12-30 17:32:12 · 349 阅读 · 0 评论 -
blog
001、http://dzpqzb.com/2015/11/11/tongguoshixiantableview.html转载 2016-02-17 15:40:26 · 303 阅读 · 0 评论