摘要:
在页面中 1 UIImage *segmentSelected = [[UIImage imageNamed:@"segcontrol_sel.png"] 2 resizableImageWithCapInsets:UIEdgeInsetsMake(0, 15, 0, 15)]; 3 UIImage *segmentUnSelected = [[UIImage imageNamed:@"segcontrol_uns.png"] 4 resizableIma... 阅读全文
摘要:
1 UIImage *minImage = [[UIImage imageNamed:@"slider_minimum.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 0)];2 UIImage *maxImage = [[UIImage imageNamed:@"slider_maximum.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 0)];3 UIImage *thumbImage = [UIImage 阅读全文
摘要:
1 UIImage *tabBackground = [[UIImage imageNamed:@"tab_bg"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];2 [[UITabBar appearance] setBackgroundImage:tabBackground]; // 设置UITabBar背景图片3 4 [[UITabBar appearance] setSelectionIndicatorImage:5 [UIImage imageNamed:@"tab_s... 阅读全文
摘要:
1 [[UIImage imageNamed:@"button_textured_30"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 5)];其中Insets这个参数的格式是(top,left,bottom,right),从上、左、下、右分别在图片上画了一道线,这样就给一个图片加了一个框。只有在框里面的部分才会被拉伸,而框外面的部分则不会改变。4个参数是上边界,左边界,下边界,右边界距离,也可以为负值。 阅读全文
摘要:
定制回退按钮1 UIImage *buttonBack30 = [[UIImage imageNamed:@"button_back_textured_30"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 13, 0, 5)];2 UIImage *buttonBack24 = [[UIImage imageNamed:@"button_back_textured_24"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 12, 0, 5)];3 [[UI 阅读全文
摘要:
在AppDelegate.m中设置背景1 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{2 UIImage *image = [UIImageimageNamed:@"tab_bg.png"];3 [[UINavigationBar appearance] setBackgroundImage:image4 forBarMetric... 阅读全文
摘要:
1 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath2 {3 [tableView deselectRowAtIndexPath:indexPath animated:YES];4 // 不加此句时,在二级栏目点击返回时,此行会由选中状态慢慢变成非选中状态。5 // 加上此句,返回时直接就是非选中状态。6 } 阅读全文