- 博客(16)
- 问答 (1)
- 收藏
- 关注
原创 Mac 直连PC共享的一个坑
大家都知道用smb://ip地址,然后会弹窗输入账户和密码,但如果你的mac系统的时间跟pc的系统时间不一致(大概是差超过24小时,没有具体测试过),就会登录不成功,原理我也没搞明白,但改下系统时间就可以解决了,希望能帮助遇到此问题的朋友!
2016-03-23 14:07:38
2454
原创 好的学习网址
http://www.cnblogs.com/vamei/archive/2013/03/14/2958654.htmlhttps://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.pdfhttp://www.cocoachina.com/
2015-04-24 16:18:42
525
原创 自定义的打印宏
#define DebugLogEnable 1#if DebugLogEnable #define DebugString(format,...) ([NSString stringWithFormat: @" %s %@ ", __FUNCTION__, [NSString stringWithFormat:format, ##__VA_ARGS__]
2015-01-07 23:32:04
461
转载 数组乱序
#pragma mark -#pragma mark (NSMutableArray *)randArray:(NSMutableArray *)ary- (NSMutableArray *)randArray:(NSMutableArray *)ary{ NSMutableArray *tmpAry = [NSMutableArray arrayWithArray:ary]; NSUIn
2014-06-25 16:42:02
559
转载 iOS plist读写
NSString *lib = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,NSUserDomainMask, YES)lastObject]; NSString *libPath = [lib stringByAppendingString:@"/Caches"]; NSString* pli
2014-05-26 21:40:18
429
原创 UIPageViewController最简单的使用方法
- (void)viewDidLoad{ [superviewDidLoad]; // Do any additional setup after loading the view. self.pageViewController = [[UIPageViewControlleralloc] initWithTransitionStyle:UI
2014-05-25 20:50:05
691
转载 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
481
原创 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
542
转载 ios获取未知类所有属性和方法
#import @implementation NSObject (XXOOProperty) /* 获取对象的所有属性和属性内容 */ - (NSDictionary *)getAllPropertiesAndVaules { NSMutableDictionary *props = [NSMutableDictionarydictiona
2014-02-13 14:29:13
517
原创 有ScrollView的controller在进行视图切换的时候,ScrollView的Frame会发生变化的解决
-(void)viewWillAppear:(BOOL)animated{ self.automaticallyAdjustsScrollViewInsets =NO;}只需要在viewWillAppear里设置这个属性就可以了!
2014-02-13 11:11:51
615
转载 Objective-C 属性特性(assign , retain , copy , readonly , readwrite , atomic , nonatomic)
assign:指定setter方法用简单的赋值,这是默认操作。你可以对标量类型(如int)使用这个属性。你可以想象一个float,它不是一个对象,所以它不能retain、copy。 assign:简单赋值,不更改索引计数(Reference Counting).使用assign: 对基础数据类型 (NSInteger)和C数据类型(int, float, double, char,
2014-02-08 17:06:55
483
转载 自定义Navigationbar,使用Catagory
自定义Navigationbar,使用Catagory方法一:// UINavBar.h#import@interface UINavigationBar (UINavigationBarCategory)UIImageView *bg;-(void)setBackgroundImage:(UIImage*)image;- (void)insertSub
2014-01-09 19:10:54
602
转载 动态加载图片
官方的例子(支持3.x以上的机子)http://developer.apple.com/library/ios/#samplecode/LazyTableImages/Introduction/Intro.html 其实在iphone上面是实现图片的动态加载,其实也不是很难,其中只要在代理中实现方法就可以首先在头文件中声明使用到的代理 如 @interfa
2014-01-04 12:48:57
482
转载 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
374
转载 Class类型, 选择器Selector以及指针函数
我们在实际上的编程过程中,也许会遇到这样的场景,那就是我们在写程序的时候不能确切的知道我们需要使用什么类,使用这个类的什么方法。在这个时候,我们需要在我们的程序里面动态的根据用户的输入来创建我们在写程序不知道的类的对象,并且调用这个对象的实例方法。Objective-C为我们提供了Class类型, 选择器Selector以及指针函数来实现这样的需求,从而大大的提高了我们程序的动态性能。
2013-12-14 15:30:21
614
空空如也
IOS里json数据中有一段JavaScript的数据,怎么把这部分显示到UI上?
2014-02-25
TA创建的收藏夹 TA关注的收藏夹
TA关注的人