Author Archives: Sian

让CentOS服务器支持https(安全http协议)

1、安装mod_ssl

通过yum来在线安装mod_ssl
[root@Crayfish home]# yum -y install mod_ssl ? ???← 在线安装mod_ssl
Loaded plugins: security
base? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? | 3.7 kB? ???00:00
epel? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? | 4.4 kB? ???00:00
extras? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ???| 3.4 kB? ???00:00
updates? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? | 3.4 kB? ???00:00
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mod_ssl.x86_64 1:2.2.15-31.el6.centos will be installed
–> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
Package? ?? ?? ?? ?Arch? ?? ?? ?? ???Version? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?Repository? ?? ?? ? Size
====================================================================================================
Installing:
mod_ssl? ?? ?? ?? ?x86_64? ?? ?? ?? ?1:2.2.15-31.el6.centos? ?? ?? ?? ?? ?updates? ?? ?? ?? ? 91 k

Transaction Summary
====================================================================================================
Install? ?? ? 1 Package(s)[……]

继续阅读

UILabel详解

1.创建UIlabel

1
UILabel *label1 = [[UILabelalloc] initWithFrame:CGRectMake(20, 40, 280, 80)];

2.设置背景色

1
label1.backgroundColor = [UIColor grayColor];

3.设置tag

1
label1.tag = 91;

4.设置标签文本

1
label1.text = @"Hello world!";

5.设置标签文本字体和字体大小

1
label1.font = [UIFont fontWithName:@"Arial" size:30];

6.设置文本对其方式

1
label1.textAlignment = UITextAlignmentCenter;

文本对齐方式有以下三种

1
2
3
4
5
6
7
8
typedef enum {
              UITextAlignmentLeft = 0,左对齐
 
              UITextAlignmentCenter,居中对齐 
 
              UITextAlignmentRight, 右对齐 
 
} UITextAlignment;

[……]

继续阅读

富文本(NSMutableAttributedString)的使用

1、创建对象

1
2
3
  NSString *original = @"今天你还好吗?";
 
  NSMutableAttributedString *attrTitle = [[NSMutableAttributedStringalloc] initWithString:original];

2、设置属性[……]

继续阅读