相关疑难解决方法(0)

无法在捆绑中找到名为"Main"的故事板

我收到一个奇怪的错误:'Could not find a storyboard named 'Main' in bundle NSBundle'试图在真正的iOS设备上运行我的应用程序.

我在我的目录中有文件,它在模拟器中工作正常.但是,在该Copy Bundle Resources部分中,文件Main.storyboard为红色.

我已经尝试删除它并再次添加它,重新启动Xcode,清理构建等,但无济于事.这是我在Xcode中收到的警告:

/Users/ajay/Documents/avx/avx/Base.lproj/Main.storyboard: Internationalization of /Users/ajay/Documents/avx/avx/Base.lproj/Main.storyboard is not available when compiling for targets before iOS 6.0
Run Code Online (Sandbox Code Playgroud)

iphone xcode objective-c ios

59
推荐指数
14
解决办法
6万
查看次数

"复制包资源"中缺少故事板

我正在使用基础国际化来使我的应用程序国际化.一旦我使用它,我的故事板在"复制包资源"中变成红色(在我使用基础国际化之前它们是正常的): 在此输入图像描述

我试过Xcode Copy Bundle Resources无法找到文件, Base国际化和多个故事板无法正常工作Base Internationalization以及"找不到名为[...]的故事板".不幸的是,他们都没有为我工作.

我该怎样才能正常?

编辑

这个问题在xcode5中仍然存在

xcode

21
推荐指数
1
解决办法
7656
查看次数

iOS Storyboard可本地化的字符串不适用于UILabel子类

我正在使用新的iOS功能来翻译故事板(http://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/chapters/InternationalizeYourApp/InternationalizeYourApp/InternationalizeYourApp.html)

这个解决方案的问题,它不适用于我的UILabel子类.

以下是我的UILabel子类的代码:

.H:

#import <UIKit/UIKit.h>
@interface LabelThinText : UILabel
- (void)awakeFromNib;
-(id)initWithFrame:(CGRect)frame;
@end
Run Code Online (Sandbox Code Playgroud)

.m:

@implementation LabelThinText

- (void)awakeFromNib
{
    [super awakeFromNib];
    [self setFont:[UIFont fontWithName:@"Raleway-Light" size:[[self font] pointSize]]];
}

-(id)initWithFrame:(CGRect)frame
{
    id result = [super initWithFrame:frame];
    if (result) {
        [self setFont:[UIFont fontWithName:@"Raleway-Light" size:[[self font] pointSize]]];
    }
    return result;
}

@end    
Run Code Online (Sandbox Code Playgroud)

我想我错过了从Storyboard.strings文件中获取自动翻译的东西.

有人有想法吗?

谢谢 !

fonts translation localization ios uistoryboard

5
推荐指数
1
解决办法
2192
查看次数