zoukankan      html  css  js  c++  java
  • iOS7 各种问题解决

    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 少了一条分割线的问题

    iOS <wbr>7 <wbr>问题解决

    原始代码

    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  

  • 相关阅读:
    Sharding-JDBC多数据源动态切换
    U 盘安装 CentOS 7 时出现 No Caching mode page found 问题的解决
    sudo 密码直接添加到命令行以方便实现脚本自动化
    Python3 Windows 虚拟环境的若干问题
    20 张图让你彻底弄懂 HTTPS 原理!
    全网写得最好的分库分表之 Sharding-JDBC 中间件介绍
    以为线程池很简单,结果第一道题就被干趴下了!
    以为线程池很简单,没想到第一问就被干趴下了
    分布式事务,看这篇就够了!
    我是一个线程池
  • 原文地址:https://www.cnblogs.com/liushanshan/p/3483526.html
Copyright © 2011-2022 走看看