我正在使用IFTweetLabel,並且它能夠識別鏈接,但是我使用IFTweetLabel創建的按鈕打開webview的時間很可怕。我運行的NSLog,並可以清楚地看到它是理解每個按鈕時按下按鈕,但它不會打開的URL由於某種原因。IFTweetLabel RegexKitLite open UIWebView
下面是我用來顯示視圖和加載字符串在web視圖中的代碼....除了加載的web視圖之外,所有的作品。
任何建議將非常感謝!謝謝!
- (void)handleTweetNotification:(NSNotification *)notification
{
[UIView beginAnimations:@"animateView" context:nil];
[UIView setAnimationDuration:1.0];
CGRect viewFrame = [MainwebView frame];
viewFrame.origin.x = 220;
MainwebView.frame = viewFrame;
MainwebView.alpha = 1.0;
web.alpha = 1.0;
MainwebView.layer.shadowColor = [[UIColor blackColor] CGColor];
MainwebView.layer.shadowOffset = CGSizeMake(1.0f, 1.0f);
MainwebView.layer.shadowRadius = 8.0f;
MainwebView.layer.shadowOpacity = 1.0f;
[self.view addSubview:MainwebView];
[UIView commitAnimations];
[web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:tweetLabel.text]]];
NSLog(@"handleTweetNotification: WTF notification = %@", notification);
}