Вы должны использовать NSURLRequest и NSURLConnection и UIActivityIndicatorView и NSData Objects в вашем .H файле.
NSURLRequest *theRequest;
NSURLConnection *theConnection;
IBOutlet UIActivityIndicatorView *myIndicator;
NSMutableData *receivedData;
}
@property (nonatomic, retain) NSMutableData *receivedData;
@property (nonatomic,retain) IBOutlet UIActivityIndicatorView *myIndicator;
.m Файл
@synthesize youTubeWebView,receivedData,myIndicator;
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[receivedData appendData:data];
}
- (void)viewDidLoad {
[super viewDidLoad];
[myIndicator startAnimating];
myIndicator.hidesWhenStopped = YES;
// Now your code of fb integration
NSURLRequest requestWithURL:url;
theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
receivedData = [[NSMutableData data] retain];
}
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
// code after Loading of fb page
[myIndicator stopAnimating];
}
Надеюсь, все это поможет вам:))