我有一个标签栏应用程序,每个选项卡上有不同的视图.每个视图都有一个UINavigationBar,其标题在Interface Builder上设置.我想根据ViewDidLoad方法中的子句更改标题,所以如果x {更改标题}.
我试过self.title = @"title",但这会更改标签栏项目本身的标题.
那么,这是怎么做到的?
我正在尝试下载网页(html),然后显示已在UIWebView中下载的本地html.
这是我试过的 -
NSString *stringURL = @"url to file";
NSURL *url = [NSURL URLWithString:stringURL];
NSData *urlData = [NSData dataWithContentsOfURL:url];
if ( urlData )
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory,@"index.html"];
[urlData writeToFile:filePath atomically:YES];
}
//Load the request in the UIWebView.
[web loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]]; // Do any additional setup after loading the view from its nib.
Run Code Online (Sandbox Code Playgroud)
但这会产生'SIGABRT'错误.
不太确定我做错了什么?
任何帮助,将不胜感激.谢谢!
我试图让我的应用程序在iTunes上连接app加载程序时遇到了很多麻烦.我认为问题在于ID之间的联系,以及它们如何匹配.有人可以解释一下我吗?
我的情况 -
Info.plist中的Bundle Identifier com.<domain>.<appname>
分发配置配置文件iOS配置文件中的应用程序ID <10 digit 'bundle seed'>.com.<domain>.<appname>
iTunes Connect中生成的"Bundle ID" com.<domain>.<appname>
这都是正确的吗?
谢谢,