Tag Archives: 基础知识

如何给UINavigationBar 设置背景颜色或是自定义图片

在项目中添加如下代码:

1
2
3
//设置背景颜色:
UIColor *itemcolor = [UIColor colorWithRed:100.0f/255.0f green:176.0f/255.0f blue:0.0f/255.0f alpha:0.3f];
self.navigationContro[......]<p class="read-more"><a href="https://www.yusian.com/blog/project/2015/01/06/114550403.html">继续阅读</a></p>

NSDate/NSDateFormatter的相关用法

1.NSDateFormatter配合NSDate与NSString之间的转化NSDateFormatter有下面2个方法:

1
2
- (NSString *)stringFromDate:(NSDate *)date;//NSDate转NSString
- (NSDate *)dateFromStrin[......]<p class="read-more"><a href="https://www.yusian.com/blog/project/2014/12/31/101025407.html">继续阅读</a></p>

ios开发中SQLite3的基本使用–打开数据库

1
2
3
4
5
6
7
8
9
10
#import "ViewController.h"
#include 
 
@implementation ViewController
 
- (void)viewDidLoad
{
    [super viewDidLoad];
    // 获取Documents路径
    NSString[......]<p class="read-more"><a href="https://www.yusian.com/blog/project/2014/12/19/115931411.html">继续阅读</a></p>

iOS项目开发-如何在沙盒中创建文件夹

一、基本思路

1、拼接好需要创建文件夹在沙盒中的绝对路径

2、利用NSFileManager判断需要创建的目录中是否存在该文件夹

3、如果不存在则创建该文件夹

二、关键代码

1
2
3
4
5
//
//  SACache.m
//  MIG
//
//  Created by 余西安 on 14/11/27.[......]<p class="read-more"><a href="https://www.yusian.com/blog/project/2014/12/01/152706416.html">继续阅读</a></p>

iOS项目开发各种icon图标尺寸标准(苹果官方文档)

Table 1??iPhone-only app icon requirements.

ImageSize (px)
File Name
Used For
App Store
Ad Hoc
512×512
iTunesArtwork
App list in iTunes
Do not include
Optional but recommended
1024×1024
iTunesArtwork@2x
App list in iTunes on devices with retina display
Do not include
Optional but recommended
120×120
Icon-60@2x.png
Home screen on iPhone/iPod Touch with retina display
Required
Required
76×76
Icon-76.png
Home screen on iPad
Optional but recommended
Optional but recommended
152×152
Icon-76@2x.png
Home screen on iPad with retina display
Optional but recommended
Optional but recommended
40×40
Icon-Small-40.png
Spotlight
Optional but recommended
Optional but recommended
80×80
Icon-Small-40@2x.png
Spotlight on devices with retina display
Optional but recommended
Optional but recommended
29×29
Icon-Small.png
Settings
Recommended if you have a Settings bundle, optional otherwise
Recommended if you have a Settings bundle, optional otherwise
58×58
Icon-Small@2x.png
Settings on devices with retina display
Recommended if you have a Settings bundle, optional otherwise
Recommended if you have a Settings bundle, optional otherwise

[……]

继续阅读