解决方案 »

  1.   

    在launchscreen.xib中拖放的imageview可以通过添加 auto layout 约束来适应各个屏幕的尺寸。这一块使用到的技术就是NSLayoutConstraint 。通过auto layout 你可以给imageview添加pin 或水平居中,垂直居中等约束。iphone 中非retain 屏的像素是 320*480 也就是1x ,retain 屏的像素是非retain屏的2倍,所以我们用 @2x 来表示图片是在retain屏中来使用。 4.7的iphone6 也是使用@2x的 ,5.5的 iphone6 plus 它使用的是@3x 的图片像素
    至于ipad ,非retain屏的像素是1024 *768 , retain 屏同iphone是原来的2倍
      

  2.   


    是不是如下这样的:
    iphone: 1x: 320*480
                 2x: 640*960
                 3x: 960*1440 
    ipad:     1x: 768*1024
                 2x: 1536*2048  
     那retina 4 2x是多大?
      

  3.   

    另外,我想用SQLite3存储数据,能不能推荐点这方面的资料?有没有简单易懂的实例代码?多谢了
      

  4.   

    在launchscreen.xib中拖放的imageview可以通过添加 auto layout 约束来适应各个屏幕的尺寸
    是不是用这里设置
    应该怎么设置呢?本人刚接触ios,望多多指教。再介绍点这方面的资料那是极好的啦。
    多谢多谢。
      

  5.   

    retina 4是指4寸屏,即640*1136。
    sqlite的入门没有比这个更简单的了:http://www.appcoda.com/sqlite-database-ios-app-tutorial/
    原生API使用起来有点麻烦,你可以在学习阶段用用原生API,后期再看看FMDB,看看是怎么封装的。
    你最后发的那几张图是Size Classes的功能点,建议你先把Auto Layout布局系统熟练使用(Xib拖拽的方式和手写的方式),然后看看猫神的这篇:http://onevcat.com/2014/07/ios-ui-unique/
      

  6.   


    是不是如下这样的:
    iphone: 1x: 320*480
                 2x: 640*960
                 3x: 960*1440 
    ipad:     1x: 768*1024
                 2x: 1536*2048  
     那retina 4 2x是多大?retain 4 是 4-inch 屏,高度变高了,尺寸是320*568,对应的像素值是640*1136
      

  7.   

    建议使用CoreData 来操作,其本质也是使用sqlite来存储的数据。如果不使用CoreData,也可以使用一些比sqlite3好用的第三方库来操作,如:FMDB库,可以去github上下载
      

  8.   


    这是对size class的设置。auto layout 的约束是在右下角上的几个图标。也可以通过菜单上的"Editor" 中找到相应的功能。
      

  9.   

     //设置splashVC,显示splashVC.view。不使用其他splashVC的功能
        self.splashViewController=[[UIViewController alloc]init];
        NSString * splashImageName=@"splash.jpg";
        if(self.window.bounds.size.height>480){
            splashImageName=@"splashR4.jpg";
        }
        self.splashViewController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:splashImageName]];
        //把splashVC添加进去
        [self.window addSubview:self.splashViewController.view];
        //⬇️ 让splashimage显示2s,让用户看一眼得了。
        [self performSelector:@selector(splashAnimate:) withObject:@0.0 afterDelay:2.0];-(void) splashAnimate:(NSNumber *)alpha{
        // ⬇️ 只能用UIViewAnimationOptionCurveEaseInOut和ViewAnimationOptionTransitionNone两种效果
        UIView * splashView=self.splashViewController.view;
        [UIView animateWithDuration:1.0 animations:^{
            splashView.transform=CGAffineTransformScale(splashView.transform, 1.5, 1.5);
            splashView.alpha=alpha.floatValue;
        } completion:^(BOOL finished) {
            //ARC通过赋值nil释放内存,动画中不能removeFromSuperview.
            [splashView removeFromSuperview];
            self.splashViewController=nil;
        }];
    }这个思路是否满足你的要求呢??
    不过我感觉程序员如果大了起来,自然启动画面时间就长了~~~
      

  10.   

    可以在AppDelegate 的应用启动的代理方法中阻塞主线程来达到效果。如
    sleep(2);
      

  11.   

    受益匪浅,我也是新手,处于学习的阶段。感谢!
    个人觉得这也还不错:   http://www.imgeek.org/