ITeye博客

http://www.helmsmansoft.com

helmsman_xcode · 共 16 篇文章

用UITableViewCell实现电子书平铺书架效果

原创文章,如需转载请注明:转载自:舵手程序 http://www.helmsmansoft.com/index.php/archives/70 现阶段网上讲解的实现这种效果的文章一般都是用UIVIew 去加载UIButton实现此功能,今天给大家说一下在UITableViewCell下怎样去实现这种效果 UITableViewCell默认是列表形态,默认状态下允许加载一张图片,如果想实现在UITableViewCell中显示多行图片,可以自定义UIView,把UIView加载到Cell上即可实现这种效果。这里主要说一下怎么去写Cell里的功能,其它功能不具体解释了。 具体见代码: 在theT…

2011-09-16 11:26 · ios-综合基础文章 · 评论(0)

MAC系统安装WIN7时出现的问题

本文摘自:舵手程序:http://www.helmsmansoft.com 前几天给自己的苹果系统安装WIN7系统,因为在苹果系统下是无法运行.exe程序的(可借助第三方软件),所以要想安装 双系统一个办法是安装虚拟机,在虚拟机上安装WIN7系统。另一个办法就是用光盘或者制作的启动盘 (未试过)来装双系统。在用苹果系统自带的Boot Camp助手来装WIN7系统时,首先要给WIN7系统 分区,幸好苹果的这个软件做的比较人性化,只需要轻轻拖动软件上的滑块就可以分配出要装WIN7 系统的空间。因为当时没有准备系统安装盘,所以分区完事以后就没有装win7系统,可是第二天在开 机的时候问题就出现了。…

2011-09-15 15:57 · 系统杂谈 · 评论(0)

遍历指定目录下的文件,将复合条件的文件加载到列表(UITableView))

本站最新网址:<http://www.helmsmansoft.com > 欢迎关注 - (void)viewDidLoad { NSFileManager *fileManager = [[nsfilemanager defaultmanager] init]; everyTitle = [[nsmutablearray alloc] init]; NSArray *filePaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *filePath =…

2011-08-22 09:10 · ios-综合基础文章 · 评论(0)

遍历目录下指定文件类型的文件,并输出

[super viewdidload]; NSFileManager *fileManager = [nsfilemanager defaultmanager]; NSArray *path =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *file = [path objectatindex:0]; //获得Document系统文件目录路径 NSDirectoryEnumerator *direnum = [filemanager enumeratoratp…

2011-08-17 17:54 · ios-综合基础文章 · 评论(0)

(转)UIApplication sharedApplication

iPhone应用程序是由主函数main启动,它负责调用UIApplicationMain函数,该函数的形式如下所示: int UIApplicationMain ( int argc, char *argv, NSString *principalClassName, NSString *delegateClassName ); 那么UIApplicationMain函数到底做了哪些事情呢?这个函数主要负责三件 事情: 1)从给定的类名初始化应用程序对象,也就是初始化UIApplication或者子类对象的一个实例,如果你在这里给定的是nil,那么 系统会默认UIApplication类,也…

2011-08-17 16:14 · ios-综合基础文章 · 评论(0)

隐藏UINavigation

在需要的地方设置即可 [self.navigationController setNavigationBarHidden:YES animated:YES]; 显示 [self.navigationController setNavigationBarHidden:NO animated:YES];

2011-08-17 11:05 · ios-综合基础文章 · 评论(0)

在状态栏中添加Activity Indicator View 图标

添加此属性即可: [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;

2011-08-16 15:49 · ios-综合基础文章 · 评论(0)

实现UIImage的移动动画

- (void)viewDidLoad { imageView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; image = [UIImage imageNamed:@"apple.png"]; imageView.image = image; [self.view addSubview:imageView]; } 触屏获得接触点的坐标 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch …

2011-08-16 09:28 · ios-综合基础文章 · 评论(0)

UIAlertView的基本操作

UIAlertView 提示框 定义并显示: UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"title" message:nil delegate:nil cancelButtonTitle:@"button" otherButtonTitles: @"otherButton",nil]; [alert show]; [alert release]; 多个按钮可对otherButtonTitles进行设置 例如:otherButtonTitles: @"otherButtonOne",@"otherButtonTwo",ni…

2011-08-15 17:59 · ios-综合基础文章 · 评论(0)

在UIAlertVIew 中 添加 UITextField

UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"添加" message:nil delegate:self cancelButtonTitle:@"确定" otherButtonTitles: @"取消",nil]; textField = [[UITextField alloc] initWithFrame:CGRectMake(12, 45, 260, 25)]; textField.backgroundColor = [UIColor whiteColor]; [alert addSubview:textField]; …

2011-08-15 17:23 · ios-综合基础文章 · 评论(0)

表UITableViewController 的一些操作方法

是否可以对表进行编辑 [self.tableView setEditing:BOOL animated:YES]; BOOL 为YES 可对表中的数据进行如下操作: 移动 - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { return YES; } - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(N…

2011-08-15 16:47 · ios-综合基础文章 · 评论(0)

 数组基础

1、创建数组 NSArray *array = initWithObjects:@"One",@"Two",@"Three",@"Four",nil]; 2、数组所包含对象个数 3、获取指定索引处的对象 4、从一个数组拷贝数据到另一数组(可变数级) //arrayWithArray: //NSArray *array1 = init]; NSMutableArray *MutableArray = init]; NSArray *array = ; NSLog(@"array:%@",array); MutableArray = ; NSLog(@"MutableArray:%@",Muta…

2011-08-15 15:43 · ios-综合基础文章 · 评论(0)

UINavigationController,UIBarButtonItem应用的例子

rootViewController.m文件 - (void)viewDidLoad { self.title = @"First Page"; NSMutableArray *array = [[NSMutableArray alloc] init]; DisclosureButtonController *buttonController = [[DisclosureButtonController alloc] initWithStyle:UITableViewStylePlain]; buttonController.title = @"Button View"; buttonCon…

2011-08-12 17:23 · ios-综合基础文章 · 评论(0)

创建一个简单表-UITableView

1.创建基于View-based Application的工程,添加一个UITableView控键. 2. .h文件中加入委托协议 UITableViewDelegate,UITableViewDataSource 并链接 3. .m文件中方法实现:代码如下: 重写VIewDidLoad方法 - (void)viewDidLoad { [super viewDidLoad]; NSArray *array = [[NSArray alloc] initWithObjects:@"The First One",@"The Second One",@"The Third One",@"The F…

2011-08-11 14:35 · ios-综合基础文章 · 评论(0)

UIImageView 从左到右出现的动画效果

UIImageView *imgView =[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 460)]; [imgView setImage:[UIImage imageNamed:@"pagethr.png"]]; self.imageViews = imgView; [self.view addSubview:imageViews]; [imgView release]; CGContextRef context = UIGraphicsGetCurrentContext(); [UIView beginAnimations:…

2011-08-11 11:47 · ios-综合基础文章 · 评论(0)