1 UITableView 行分割線不到頭,短線問題html
if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {url
[self.tableView setSeparatorInset:UIEdgeInsetsZero];spa
}htm
2 iOS 7 全屏幕排版 改成 iOS 6 的排版方式。默認從狀態欄和導航欄下面開始排版blog
- (void)viewDidLoadget
{it
if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) {io
self.edgesForExtendedLayout = UIRectEdgeNone;table
}import
[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