IFTweetLabel RegexKitLite open UIWebView-Collection of common programming errors
I am using IFTweetLabel and have it to the point were it recognizes links but I am having an awful time opening a webview with the button IFTweetLabel creates. I a running the NSLog and can clearly see it is understanding each link when the button is presses but it will not open the URL for some reason .
Below is the code I am using to show the view and load the string in a webView….which all works besides the loading of the webview.
Any suggestions would be very much appreciated! thank you!
- (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);
}