Chinaunix首页 | 论坛 | 博客
  • 博客访问: 696608
  • 博文数量: 260
  • 博客积分: 7033
  • 博客等级: 少将
  • 技术积分: 2633
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-13 23:15
文章分类

全部博文(260)

文章存档

2012年(2)

2011年(41)

2010年(78)

2009年(139)

我的朋友

分类:

2010-06-14 18:41:21

将当前的iPhone版139说客更新为iPad的版本,基本上很顺利。
界面主要部分只花了下午2个多小时的时间。

主要修改点:
1) 将当前Target更新为支持iPad的版本
2) 设置iPad版本启动画面
3) 程序中根据如下宏来分别生成iPhone/iPad界面:

- (void)loadView
{
    UIControl *viewControl = [[UIControl alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
    [viewControl addTarget: self action: @selector(resignKeyboard) forControlEvents: UIControlEventTouchUpInside];
    self.view = viewControl;
    [viewControl release];

    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    {
        m_backgroundImageView = [[UIImageView alloc] initWithImage: [UIImage imageNamed: @"iPad_Login_768x1024.png"]];
       
        ...
    }
    else
    {
        m_backgroundImageView = [[UIImageView alloc] initWithImage: [UIImage imageNamed: @"139_Login.png"]];
        ...
    }

    ...

}

阅读(1216) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~