• 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  

  • 相关阅读:
    如何理解「复位 」?
    menuconfig配置
    编译Linux内核过程中遇到的问题与解决
    解决qt 5.14版本 qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization faile问题
    认真教好软件工程
    2016同学们博客链接汇总
    车站订票系统可行性分析报告
    第四纪与地貌学(1)——长江口第四纪沉积物中构造与古气候耦合作用的探讨
    软件工程(1)——对书本的温习
    四则运算
  • 原文地址:https://www.cnblogs.com/liushanshan/p/3483526.html
Copyright © 2020-2023  润新知