ios 学习札记 细节(一)

刚学ios,一些地方要做笔记,主要怕忘了。

一 、杂七杂八

1.UINavigationController 里面的导航键风格设置:

self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;(设置成黑色)

2.图片查看器效果:

http://code4app.com/ios/Image-Gallery/4f67f4546803fa6d45000001 

3.加上新的库以后,一定要在工程中的build phases中查看新加源文件是否包含进。

4.快速枚举

        for (BIDListViewModel * item in array)

        {

            if(item.has_image == YES)

            {

                self.imageNumber++;

            }

        }

5.plist文件,可以在新建的文件中选Resource项,然后选中Property List新文件。既可创建

6.从下网上切换页面有几种风格:

调用方法:

MyViewController *myViewController = [[MyViewController alloc] init];

myViewController.modalPresentationStyle = UIModalPresentationFormSheet;//多种风格,具体查看源代码

[self presentModalViewController:myViewController animated:YES];

 7.证书得安装,解压缩以后,选中.mobileprovision文件(两个),直接拖到xcode中即可

x.ios中函数传出参数类似c

例如:

UIImage *normal = nil;
[self getXianxingInfo:&normal];
- (void)getXianxingInfo:(UIImage **)normal)
{
    *normal = [UIImage imageNamed:@"index_weihao.png"];
}
原文地址:https://www.cnblogs.com/Peterahan/p/2637439.html