IPhone
共 8 篇文章
一些iOS高效开源类库
KissXml ——xml解析库 相关教程:http://www.iteye.com/topic/625849 http://sencho.blog.163.com/blog/static/83056228201151743110540/ 很方便的一个xml解析器,支持Xpath查询。 skpsmtpmessage ——Quick SMTP邮件发送 svn checkout http://skpsmtpmessage.googlecode.com/svn/trunk/ skpsmtpmessage-read-only github: git clone https://github.com/…
2012-03-20 16:06 · IPhone
IPhone 之 UINavigationController
1. 创建Navigation-based application 工程 2. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController : UIViewController { } -(IBAction)englishClick:(id)sender; @end 3. RootViewController.m #import "RootViewController.h" #import "English.h" @implementation RootViewController - (void)vi…
2011-12-26 23:14 · IPhone · iPhone · navigation
IPhone 之 UITableViewCell自适应高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { // 列寬 CGFloat contentWidth = self.tableView.frame.size.width; // 用何種字體進行顯示 UIFont *font = [UIFont systemFontOfSize:13]; // 該行要顯示的內容 NSString *content = [data objectAtIndex:indexPath.row]; // 計算出顯示完內容需要的…
2011-12-19 15:51 · IPhone · iPhone · uitableviewcell · 高度
IPhone 之 UIView的一些基本方法理解
init:方法 在init方法中实例化必要的对象(遵从LazyLoad思想) init方法中初始化ViewController本身 loadView:方法 这是当没有正在使用nib视图页面,子类将会创建自己的自定义视图层。绝不能直接调用。 如果手工维护views,必须重载重写该方法。 当view需要被展示而它却是nil时,viewController会调用该方法。 loadView和IB构建view 你在控制器中实现了loadView方法,那么你可能会在应用运行的某个时候被内存管理控制调用。 如果设备内存不足的时候, view 控制器会收到didReceiveMemoryWarning的消息…
2011-12-13 20:49 · IPhone · iPhone · UIView
IPhone 之 UIPageControl,UIScrollView 分页
1. ScrollDemoViewController.h #import <UIKit/UIKit.h> @interface ScrollDemoViewController : UIViewController<UIScrollViewDelegate> { IBOutlet UIPageControl *pageControl; IBOutlet UIScrollView *ScrollView; IBOutlet UIView *view1; IBOutlet UIView *view2; IBOutlet UIView *view3; } @property(nonatomic,…
2011-12-06 16:18 · IPhone · Objective-C · iPhone · 分页 · UIPageControl · UIScrollView
IPhone 之 UITableView 带搜索
@interface TableViewAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; UINavigationController *navigationController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; @end #import "TableVie…
2011-12-03 14:12 · IPhone · iPhone · UITableView · UISearchBar
IPhone之如何使用偏好设置
1. 在项目工程里新建一个setting.bundle文件 2. 程序中调用bundle内容方法: NSString *textValue = [[NSUserDefaults standardUserDefaults] stringForKey:@"textEntry_key"]; 3. 程序中修改偏号配置: NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; [userDefaults setObject:@"test" forKey:@"textEntry_key"];
2011-12-03 10:13 · IPhone · iOS · iPhone · iPad · bundle
@property详解
Objective-C语言关键词,与@synthesize配对使用。 功能:让编译好器自动编写一个与数据成员同名的方法声明来省去读写方法的声明。 如: 1、在头文件中: @property int count; 等效于在头文件中声明2个方法: - (int)count; -(void)setCount:(int)newCount; 2、实现文件(.m)中 @synthesize count; 等效于在实现文件(.m)中实现2个方法。 - (int)count { return count; } -(void)setCount:(int)newCount { count = newCount;…
2011-08-11 10:39 · IPhone