摘要: //button.titleLabel.textAlignment=NSTextAlignmentLeft;这句无效 button.contentHorizontalAlignment=UIControlContentHorizontalAlignmentLeft;button.titleEdgeI... 阅读全文
posted @ 2015-01-07 18:17 在bug中前行 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 导入pch 文件,要关联pch:最重要的一步就是,要在pch中添加如下代码:#import #ifndef __IPHONE_3_0#warning "This project uses features only available in iOS SDK 3.0 and later."#endif... 阅读全文
posted @ 2015-01-05 18:42 在bug中前行 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 先是 html 文件内容// index.html John : This is out Rich Text Editing View 加载 html 文件- (void)viewDidLoad{ [super ... 阅读全文
posted @ 2015-01-04 10:44 在bug中前行 阅读(235) 评论(0) 推荐(0) 编辑
摘要: NSData,NSImage,NSDictionary,NSString,NSInteger,Float,NSURL 等等互相转换一:NSString和NSURL 转换[cpp]view plaincopyprint?//NSString->NSURLNSString*urlString=[@"ht... 阅读全文
posted @ 2014-12-27 11:04 在bug中前行 阅读(480) 评论(0) 推荐(0) 编辑
摘要: 1、新建一个PCH文件2、修改buildsetting配置文件在搜索框里输入prefix搜索一下,比较好找(1)将绿色部分,也就是Precompile Prefix Header的值设置为YES(2)修改Prefix Header的路径红色部分为TARGETS的名字,黄色部分为所建的pch文件的名字... 阅读全文
posted @ 2014-12-25 11:55 在bug中前行 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 形如这样的输入会员卡卡好的,要求输入的数字一一对应1、 要定义的变量/// 临时变量@property(nonatomic , strong)UITextField * tempFiled;/// 标记@property (nonatomic ,assign) int tempTag;/// 存储... 阅读全文
posted @ 2014-12-24 14:27 在bug中前行 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 图片框圆角处理(UIImageView):添加QuartzCore.framework导入库头文件#import “QuartzCore/QuartzCore.h”//圆角设置imageView.layer.cornerRadius = 8;(值越大,角就越圆)imageView.layer.mas... 阅读全文
posted @ 2014-12-23 16:25 在bug中前行 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1 2 NSString * str =@"您一共购买2件商品,消费总额为:196"; 3 // 搜索文字 4 NSString *tempStr = @"\\d{1,}"; 5 6 NSMutableArray *results = [NSMutab... 阅读全文
posted @ 2014-12-23 15:28 在bug中前行 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 自适应键盘出现后View的高度调整,防止遮挡输入框1.首先在LoginViewController中实现UITextField的一个Delegate// Created by ken on 13-7-21.// Copyright (c) 2013年ken. All rights reserved.... 阅读全文
posted @ 2014-12-19 18:43 在bug中前行 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 1、使用时,一般的打印信息不会报错,一旦需要跳转到相应的控制器,就需要加上大括号,如下所示-(void)btnClick:(UIButton *)button{ switch (button.tag) { case 0: { // 修改昵称 ... 阅读全文
posted @ 2014-12-19 16:17 在bug中前行 阅读(1596) 评论(0) 推荐(0) 编辑