1 UITableView 行分割线不到头,短线问题
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[self.tableView setSeparatorInset:UIEdgeInsetsZero];
}
2 iOS 7 全屏幕排版 改为 iOS 6 的排版方式。默认从状态栏和导航栏下面开始排版
- (void)viewDidLoad
{
if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
[super viewDidLoad];
// Do any additional setup after loading the view.
}
3 UIActionSheet 少了一条分割线的问题
原始代码
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:@"Title"
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:@"First", @"Second", @"Third", @"Fourth", nil];
[actionSheet showInView:self.view];
可以设置cancelButtonTitle 或手动加入一个cancelButton
UIActionSheet *asAccounts = [[UIActionSheet alloc] initWithTitle:Localized(@"select_an_account")
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles: nil];
for (int i=0; i<[result count]; i++) {
ACAccount *acct = [result objectAtIndex:i];
[asAccounts addButtonWithTitle:[acct username]];
asAccounts.tag = i;
}
[asAccounts addButtonWithTitle:Localized(@"Cancel")];
asAccounts.cancelButtonIndex = result.count;
[asAccounts showInView:self.view];
4 iOS7 中UISegmentedControl的背景色是透明的。如果要加入背景色
没有找到属性,替代方法是加入一个圆角的UIView。
引用#import <QuartzCore/QuartzCore.h>
CGRect vRect = UISegmentedControl.frame;
vRect.size.width--;
转载:http://blog.sina.com.cn/s/blog_7018d3820101m4ry.html