- 博客(43)
- 资源 (1)
- 收藏
- 关注
原创 mac 隐藏.DS_Store
DS_Store 是用来存储这个文件夹的显示属性的:比如文件图标的摆放位置。删除以后的副作用就是这些信息的失去。之前在终端设置了一句命令行,就显示了.DS_Store文件,后来看着到处都是这个文件,该怎么隐藏掉这个文件呢defaults write com.apple.desktopservices DSDontWriteNetworkStorestrue true 在
2015-05-10 21:04:10 2947
原创 Github for Mac - SSH keys
http://blog.csdn.net/britainwei/article/details/44591297http://www.jianshu.com/p/31cbbbc5f9fa/准备:(1)注册Github账号(2)下载Github for Mac客户端并登录这个时候可以从Github上Clone in Desktop ,把工程clone到电脑
2015-04-17 14:14:53 1269
原创 ios 中怎样获取 Unix时间戳
将 2015-03-24 16:30:38 转换成 unix时间戳(1427188766) 然后上传。有毫秒, 微秒等精度, 你要看你们的应用场景来决定 //获取当前时间 NSTimeIntervaltime=[[NSDatedate]timeIntervalSince1970];// (NSTimeInterval) time = 14
2015-03-25 11:53:32 3353
原创 与后台返回数据类型老是出错(文档和现实老是对接不上)
[__NSCFNumber length]: unrecognized selector sent to instance 0x1657c5c02014-09-24 14:47:39.170 StarShow[1948:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
2015-03-24 18:54:26 809
原创 mutating method sent to immutable object
if (commentArray==nil) { commentArray = [[NSMutableArray alloc] init]; } commentArray = (NSMutableArray*)[responseObject objectForKey:@"comme
2015-03-24 18:50:50 810
原创 在xcode系统的库文件里面进行了操作造成的bug
报错:file '/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImageView.h' has been modified sinc
2015-03-24 18:48:05 580
原创 关于tableview的一些bug
about tableview bug内存压力而奔溃原因:cell没有被复用一般来说,对于cell的复用是这样子的:关于cell的复用:这里根据屏幕的高度,先创建第一个cell,第二个cell。当tabbleview向上滑动的时候,第一个cell渐渐移除屏幕,创建第三个cell,从屏幕下方进入显示。当第一个cell全部移除屏幕的时候会进入复用池,第四
2015-03-24 18:39:24 1341
原创 关于xib
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ShowView" nib but the view outlet was not set
2015-03-24 18:36:02 799
原创 关于注册了通知/监听 必须注销
An instance 0x15618e00 of class UITextView was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other o
2015-03-24 18:32:58 1510
原创 Product -> Analyze
http://www.cocoachina.com/ios/20150206/11121.htmlXcode Product -> Analyze出现蓝色的(黄色的是警告,蓝色的是bug,红色的是error)点击这个就会有箭头出现的哦
2015-03-24 18:26:48 1220
原创 Potential leak of an object stored into ‘colorS'
Potential leak of an object stored into 'colorS'Call to function 'CGColorSpaceCreateDeviceRGB' returns a Core Foundation object with a +1 retain countobject allocated and stored into 'colorS' is n
2015-03-24 18:24:47 1710
原创 Potential leak of memory pointed to by 'machine'
Potential leak of memory pointed to by 'machine'NSString* zipPath=[NSStringstringWithFormat:@"{TIME=%@",[selfgetChuo_time]];size_tsize; sysctlbyname("hw.machine",NULL, &si
2015-03-24 18:21:43 4093
原创 process launch failed: timed out trying to launch app
process launch failed: timed out trying to launch app打开Xcode的菜单product -> scheme -> edit scheme -> 在左侧选择Run xxx.app栏目,右侧选择Info标签,将Build Configuration的状态改为Debug,然后重新Command + R,正常运行了~(如果还是不行,请检
2015-03-23 19:00:01 1167
原创 关于collectionview的初始化
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'UICollectionView must be initialized with a non-nil layout parameter'-(void)_initPhotoShowView{ UICollection
2015-03-23 18:55:07 2002
原创 Undefined symbols for architecture armv7
这里我是因为类重复的原因。因为我把一个类的.m文件全部复制(command+a)给了另一个类,xcode可能会判定我的两个类相同(虽然类名字不同,.h也不同)Undefined symbols for architecture armv7 : xcode报这个错的时候比较多,其诱发这个错误的原因也有很多:(1)添加了第三方的东西(um,sharesdk,个推,
2015-03-23 18:53:04 699
原创 Dictionary and Array value cannot be nil
Dictionary value cannot be nilTerminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert ni
2015-01-28 18:30:52 1563
原创 NSMutableAttributedString
http://www.1360.cc/ZhanChangJiaoCheng/22851.htmlNSMutableAttributedString -> NSAttributedString -> NSObject----------------------NSUnderlineStyletypedef NS_ENUM(NSInteger, N
2014-11-13 14:33:32 1500
原创 隐藏tabbar不能响应点击事件
之前一直用 这个隐藏和显示tab bar self.tabBarController.tabBar.hidden = YES;后来发现,隐藏tabbar之后,原来tabbar的区域内,新加的view不能响应点击事件。@property(nonatomic) BOOL hidesBottomBarWhenPushed; // If YES, then when this vi
2014-11-12 18:47:30 2340
原创 NSMutableParagraphStyle /NSParagraphStyle
NSMutableParagraphStyle -> NSParagraphStyle -> NSObjecttypedef NS_ENUM(NSInteger, NSLineBreakMode) {/* What to do with long lines */ NSLineBreakByWordWrapping = 0, /* Wrap a
2014-11-07 15:52:43 6049
原创 linker command failed with exit code 1 (use -v to see invocation)
linker command failed with exit code 1 (use -v to see invocation)出现这个错误的时候,看看第三方的库文件,或是自己写的类,多人合作开发的时候,有的会重复添加文件到工程,或是没有添加进工程等情况。一般报错这样子的错误的时候,前面会给出一大堆的信息,你就去看看具体的那个类或是文件的提醒,然后在这里搜索一下,
2014-10-22 14:35:18 863
原创 tableview获取选中cell对象
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
2014-10-17 11:40:14 1148
原创 iOS 画线
@interface ShowLineView : UIView-(void)drawRect:(CGRect)rect{ CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineCap(context, kCGLineCapSquare);//设置线条样式 CGC
2014-09-24 16:56:33 942
原创 error: property's synthesized getter follows Cocoa naming convention for returning 'owned' objects I
error: property's synthesized getter follows Cocoa naming convention for returning 'owned' objectsIn file included from /Users/developer/Documents/StarShow/ShowWall/View/NewShowItemView.m:9:/Users
2014-09-24 15:00:20 1415
原创 whose view is not in the window hierarchy!
whose view is not in the window hierarchy! [self presentViewController:tabbar animated:NO completion:NULL];不要在viewWillAppear 和 viewDidLoad 实现页面跳转viewDidAppear方法和viewDidLoad方法的区别在
2014-09-24 14:58:49 1131
原创 -[__NSCFNumber length]: unrecognized selector sent to instance 0x1657c5c0 2014-09-24 14:47:39.170 St
-[__NSCFNumber length]: unrecognized selector sent to instance 0x1657c5c02014-09-24 14:47:39.170 StarShow[1948:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason
2014-09-24 14:56:45 1808
原创 AFNetworking Get请求使用
AFNetworking 2.4.0 Get请求使用http://cocoadocs.org/docsets/AFNetworking/2.4.0/-(void)getData{ NSString *urlStr = [UrlManagegetWallUrl]; AFHTTPRequestOperationManager
2014-09-24 12:56:03 1321
原创 iPhone弹出视图
http://code4app.com/ios/Popover-View-in-iPhone/4fa931bd06f6e78d0f000000 下载这个,把工具类 导入到自己工程里面,他写的代码没有使用arc,如果你的代码用了arc,要去修改设置引用类#import "FPPopoverController.h"#import "PopView
2014-09-23 18:47:11 836
原创 AFNetworking Post请求使用
AFNetworking 2.4.0 Post请求使用:上传图片+文字http://cocoadocs.org/docsets/AFNetworking/2.4.0/#import "AFNetworking.h"-(void)postRequest{ NSString *str = @"http://115.255.93.
2014-09-23 17:54:40 4530
原创 UIViewController 的属性presentingViewController
// The view controller that presented this view controller (or its farthest ancestor.)@property(nonatomic,readonly) UIViewController *presentingViewController NS_AVAILABLE_IOS(5_0);a present b
2014-09-23 15:12:22 1065
原创 iOS 协议使用(二)
ShowViewController在PopViewController拿值。注意设置代理(委托)?就像,我没有委拖你替我办事,你去银行,或者去政府替我办事,人家当然不会处理你(1)PopViewController.h#import //定义协议@protocol popNextDeleage NSObject]]]]>-(void)passPop
2014-09-23 14:59:28 1086 1
原创 iOS 协议使用(一)
这整个是一个cell,框框的放的image(有很多图片,可以左右滑动,我用iCarousel做的,这个的代理写在自定义cell类里面的)。现在需要点击图片进入下一个页面。。。。现在我点击图片,都会进入到自定义cell类里面的代理里,但是cell类里面,是不让我弹出下一个viewcontroller的。。??不然用[self.navigationController pushViewControll
2014-09-18 16:21:00 1051
原创 NSURL
NSURL *url = [NSURL URLWithString:@"http://188.295.993.192:8000/dd/koko?name=1&pass=1"]; NSLog(@"scheme:%@", [url scheme]); //协议 http NSLog(@"host:%@", [url host]); //域名 188.295.9
2014-09-17 18:03:28 960 1
原创 unrecognized selector sent to instance 0x10b34e810
报错:*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURLError isEqualToString:]: unrecognized selector sent to instance 0x10b34e810'*** First throw call st
2014-09-17 17:38:27 3549
原创 UIImage 和 NSData 的转化
UIImage ——> NSDataUIKIT_EXTERN NSData *UIImagePNGRepresentation(UIImage *image); // return image as PNG. May return nil if image has no CGImageRef or invalid bitmap
2014-09-17 14:48:03 998
原创 base64编码
NSString *name = userNameTF.text; NSString *str = passWordTF.text; //使用base64对NSString对象编码 NSData *nsdata = [str dataUsingEncoding:NSUTF8StringEncoding];
2014-09-17 14:45:57 729
原创 单例类
#import @interface Singleton : NSObject@property(strong,nonatomic) NSString *noteText;+(Singleton *)shareData;@end-------------------------#import "Singleton.h"@i
2014-09-17 14:43:20 558
原创 iOS 近期学习规划
照着iOS高级部分知识点(自己还没有捣鼓过的),有时间可以一个个知识点去攻破,看博客、找视频、查源代码demo都可以学习。然后学习swift。
2014-09-17 14:33:31 640
原创 字符串截取-以逗号分开保存为数组
NSArray *contentArray = [params componentsSeparatedByString:@",”];获取到字符串params里面以,分开的字段,保存到数组里面
2014-09-17 11:58:39 2216
原创 自定义button-iOS设置button图片文字上下居中垂直对齐
第一种:@interface BaseButton : UIButton-(UIButton*)initWithFrame:(CGRect)frame Title:(NSString *)text NormalImage:(UIImage*)normalImage SelectedImage:(UIImage *)selectedImage;@end-(
2014-09-17 11:53:06 1974
原创 iOS 定义枚举
typedef NS_ENUM(NSInteger, TopViewType) { star = 1, hot = 2, fresh = 3};@interface StarShowModel : NSObject@property(nonatomic,assign) TopViewType topViewType;
2014-09-17 11:51:09 583
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人