首先我觉得你不必重复你的Android界面像素到像素到iOS的界面。这两个平台都有不同的用户使用期限。人们习惯于并等待与此平台上的其他应用程序熟悉的界面。最好的办法知道苹果的客户从你等待^)是读取苹果人机界面指南
http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/Introduction/Introduction.html
,让我们来谈谈“标题栏”。在我的应用程序中我自定义导航栏。我只是从我的项目中复制一些代码给你一些出发点。这是它的外观 - http://macsoj.wordpress.com/2011/01/28/astrofriends/。
我通过创建UINavigationBar的新类别中更改导航栏背景,我的自定义图像 - 和压倒一切的drawRect方法,以便
@interface UINavigationBar (TransparentAdditions)
@end
@implementation UINavigationBar (TransparentAdditions)
- (void)drawRect:(CGRect)rect {
UIImage *image = [UIImage imageNamed: @"my_custom_background.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end
,现在我写的自定义标题
CGRect frame = CGRectMake(0, 0, 320, 44);
UILabel *label = [[[UILabel alloc] initWithFrame:frame] autorelease];
label.backgroundColor = [UIColor clearColor];
label.font = [UIFont fontWithName:@"MarkerFelt-Thin" size:20.0];
label.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.5];
label.textAlignment = UITextAlignmentCenter;
label.textColor = [UIColor whiteColor];
self.navigationItem.titleView = label;
label.text = @"Friends";
我希望它帮助)
沟这个皮肤的概念。 iPhone为所有应用程序提供了一致的外观和感觉的本地控件。这不仅对苹果来说很重要,对iPhone用户来说也很重要。请*强烈*考虑利用他们。它不仅会让用户更快乐,而且会使开发变得更加轻松。很少有用户会同时拥有iPhone和Android,因此完全匹配它们并不像您想象的那么相关。 – 2011-04-15 06:57:18