私は iOS プログラミングが初めてで、簡単なアプリを作成しています。最初の UITabBarItem はページをロードしますが、ロードする前にラベルがあります。Web ページの読み込み後にラベルを非表示にしようとしていますが、うまくいきません。Web ビュー デリゲートを設定する必要があると思いますが、その方法がわかりません。
firstcontroller.h
#import <UIKit/UIKit.h>
@interface OTFFirstViewController : UIViewController
@property (strong, nonatomic) IBOutlet UIWebView *webPage;
@property (strong, nonatomic) IBOutlet UILabel *pageLoading;
@end
firstcontroller.m
#import "FirstViewController.h"
@interface FirstViewController ()
@end
@implementation FirstViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSString *fullURL = @"http://asdf.com";
NSURL *url = [NSURL URLWithString:fullURL];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[_webPage loadRequest:requestObj];
}
- (void)webViewDidFinishLoad:(UIWebView *)_webPage
{
_pageLoading.hidden = YES;
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end