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  

  • 相关阅读:
    Android Studio如何设置代码自动提示
    Java中Map的用法详解
    Android 管理Activity中的fragments
    Android
    WebApp之Meta标签
    iOS中为网站添加图标到主屏幕以及增加启动画面
    HTML5添加 video 视频标签后仍然无法播放的解决方法 IIS添加MIEI类型
    WebApp之 apple-touch-icon
    Eclipse编辑器基本设置
    Redis监控方案
  • 原文地址:https://www.cnblogs.com/liushanshan/p/3483526.html
Copyright © 2011-2022 走看看