我需要显示从左侧的电子邮件地址UIButton,但它被放置在中心。
有没有办法将对齐设置为左侧UIButton?
这是我现在的代码:
UIButton* emailBtn = [[UIButton alloc] initWithFrame:CGRectMake(5,30,250,height+15)];
emailBtn.backgroundColor = [UIColor clearColor];
[emailBtn setTitle:obj2.customerEmail forState:UIControlStateNormal];
emailBtn.titleLabel.font = [UIFont systemFontOfSize:12.5];
[emailBtn setTitleColor:[[[UIColor alloc]initWithRed:0.121 green:0.472 blue:0.823 alpha:1]autorelease] forState:UIControlStateNormal];
[emailBtn addTarget:self action:@selector(emailAction:) forControlEvents:UIControlEventTouchUpInside];
[elementView addSubvie
+指仅在application/x-www-form-urlencoded内容中的空间,例如URL的查询部分:
http://www.example.com/path/foo+bar/path?query+name=query+value
在这个URL中,参数名是query name带空格的,值是query value空格,但是路径中的文件夹名字是字面意思foo+bar,不是 foo bar。
%20是在这些上下文中编码空间的有效方法。所以,如果你需要URL编码列入一个字符串URL的一部分,它始终是安全的空格替换%20用和加号%2B。这是例如。encodeURIComponent()在JavaScript中。不幸的是,这不是什么urlencode在PHP(rawurlencode更安全)