1,Search Bar 怎样去掉背景的颜色(storyboard里只能设置background颜色,可是发现clear Color无法使用)。其实在代码里还是可以设置的,那就是删除背景view [[self.searchBar.subviews objectAtIndex:0] removeFro...
分类:
移动开发 时间:
2015-08-18 09:01:37
阅读次数:
140
- (void)myMethod:(CDVInvokedUrlCommand*)command{ NSString* echo = [command.arguments objectAtIndex:0]; NSLog(@"%@",echo); POSJiaoyiViewController *...
分类:
Web程序 时间:
2015-08-14 18:47:53
阅读次数:
120
通过下面的代码,又可以将NSValue转换成CGRect,CGPoint等类型的数值。CGRect imageRect = [[self.lockImageRectArray objectAtIndex:l] CGRectValue];通过NSValue就可以实现CGxxx类型的数值存储在NSMut...
分类:
其他好文 时间:
2015-08-06 10:59:43
阅读次数:
112
//1.返回数组指定下标的元素
- (id)objectAtIndex:(NSUInteger)index;
//2.初始化数组
- (instancetype)init
NS_DESIGNATED_INITIALIZER;
//3. 初始化数组并且赋初值以及大小
- (instancetype)initWithObjects:(const
id [])objects c...
归档失败问题出在路径上,NSHomeDirectory()NSString *stringPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex: 0]...
分类:
移动开发 时间:
2015-06-05 17:09:28
阅读次数:
3902
1. 创建一个plist文件 NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString *path=[paths objectAtIndex:0...
分类:
其他好文 时间:
2015-06-01 20:17:59
阅读次数:
96
//第一种遍历:普遍的for循环
for(int?i?=?0,?i<?count,i++){
????NSlog(@"%@,%@",i,[array?objectAtIndex:i])
}
//第二种遍历:快速for循环,需要有外变量
int?i?=?0;
for(id?obj?in?array){...
分类:
编程语言 时间:
2015-05-24 20:30:15
阅读次数:
156
IOS对文件操作包含文件的创建,读写,移动,删除等操作。
1.文件的创建:
//设定文本框存储文件的位置
NSString *strFilePath=[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)objectAtIndex:0];
//指定存储文件的文件名
NS...
分类:
移动开发 时间:
2015-05-15 22:57:03
阅读次数:
201
方法1:NSMutableDictionary *dic = [[NSMutableDictionary alloc] init]; [dic setObject:[Hp_KeysArray objectAtIndex:_textField.tag] forKey:@"hpb_id"]; [di.....
分类:
其他好文 时间:
2015-05-14 16:25:41
阅读次数:
98
UIWebView *currentWebView;if ([currentWebView subviews]) { UIScrollView* scrollView = [[currentWebView subviews] objectAtIndex:0]; [scrollView setCo.....
分类:
移动开发 时间:
2015-05-09 22:07:07
阅读次数:
152