随笔分类 - ios
主要记录ios平台开发的知识
    
摘要:在安装Xcode开发环境的过程中,会把常用的一些编译器都覆盖到,gcc等也在其中。可是安装完毕后,并不能直接通过ternimal终端窗口使用命令行执行gcc,提示command not found。解决方案:需要在Xcode的设置中安装Command Line Tools组件,才能支持命令行使用。具体操作:Xcode –> Preferences –> Downloads 的Components下,安装Command Line Tools 即可。
        阅读全文
            
摘要:// 在iOS 5下自定义控件的外观- (void)customizeAppearance{ // UINavigationBar UIImage *gradientImage44 = [[UIImage imageNamed:@"surf_gradient_textured_44"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; UIImage *gradientImage32 = [[UIImage imageNamed:@"surf_gradient_textured_32"]
        阅读全文
            
摘要:1.什么是视图 视图是屏幕上的一个矩形区域。它有两个用途:第一个用途是在上面绘制内容,第二个用途是处理事件。2.视图在iphone上是分层排列的,每个视图只有一个父视图,但有零个或多个子视图。3.UIWindow是唯一没有父视图的视图,一个应用只有一个UIWindow。4.操作视图层次的方法 - (void)addSubView:(UIView *)view; - (void)removeFromSuperview; - (void)insertSubView:(UIView *)view atIndex:(int)index; - (void)insertSubview:(UIV...
        阅读全文
            
摘要:用UIImage加载图像的方法很多,最常用的是下面两种: 1、用imageNamed方法,例如: [UIImage imageNamed:ImageName]; 2、用NSData的方式加载,例如: 1. NSString *filePath = [[NSBundle mainBundle] pathForResource:fileName ofType:extension]; 2. NSData *image = [NSData dataWithContentsOfFile:filePath]; 3. [UIImage imageWithData:image]; 这两种加载方式...
        阅读全文
            
                    
                
浙公网安备 33010602011771号