UIButton *onlyPriceBtn = [UIButton buttonWithType:UIButtonTypeCustom]; onlyPriceBtn.layer.borderColor = [HuConfigration uiColorFromString:@"#F0493D"]. ...
分类:
移动开发 时间:
2017-06-22 13:22:28
阅读次数:
250
添加中划线: UILabel * strikeLabel = [[UILabel alloc] initWithFrame:(CGRectMake(10, 10, 50, 30))]; NSString *textStr = [NSString stringWithFormat:@"%@元", @" ...
分类:
其他好文 时间:
2017-06-21 13:49:53
阅读次数:
255
前言: 没有理由不去努力.png 正文:想实现UILabel居上对齐,居中对齐,居下对齐,如下效果: 效果图.png 在iOS中默认的UILabel中的文字在竖直方向上只能居中对齐,博主参考国外网站,从UILabel继承了一个新类,实现了居上对齐,居中对齐,居下对齐 具体如下: 创建:MYLabel ...
分类:
移动开发 时间:
2017-06-20 14:55:32
阅读次数:
270
iOS ,label,删除线,删划线,label添加删划线,iOS10.3之后label添加删划线的方法 ...
分类:
移动开发 时间:
2017-06-17 16:07:01
阅读次数:
839
/** * 返回UILabel自适应后的size * * @param aString 字符串 * @param width 指定宽度 * @param height 指定高度 * * @return CGSize */ + (CGSize)sizeLabelToFit:(NSAttributedS ...
分类:
其他好文 时间:
2017-06-16 10:09:18
阅读次数:
162
html代码 图1 图2 一、情景1:加载到UILabel上面(转换成富文本即可) 二、情景2:加载到UIWebView上面(替换html中部分的字符) ...
分类:
移动开发 时间:
2017-06-12 18:52:55
阅读次数:
916
import UIKit class ViewController: UIViewController { var stepper: UIStepper! var label: UILabel! override func viewDidLoad() { super.viewDidLoad() // ...
分类:
编程语言 时间:
2017-06-12 11:53:55
阅读次数:
157
class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // 标签 let label: UILabel = UILabel(frame: CGRect(x: 100, y: ...
分类:
编程语言 时间:
2017-06-09 14:13:54
阅读次数:
128
.h文件 #import <UIKit/UIKit.h> @interface UILabel (ContentSize) - (CGSize)contentSize; @end .m文件 #import "UILabel+ContentSize.h" @implementation UILabel ...
分类:
移动开发 时间:
2017-06-06 15:53:27
阅读次数:
206
import UIKit class ViewController3: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor=UIColor.whiteColor( ...
分类:
编程语言 时间:
2017-06-05 11:33:46
阅读次数:
194