Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7447697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:41:45+00:00 2026-05-29T12:41:45+00:00

I am using IFTweetLabel and have it to the point were it recognizes links

  • 0

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);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:41:49+00:00Added an answer on May 29, 2026 at 12:41 pm

    Here’s my code which should work well, but also should be cleaned up some:

        - (void)handleTweetNotification:(NSNotification *)notification {    
    
        unichar theChar = [(NSString *)notification.object characterAtIndex:0];
        NSString *theString = (NSString *)notification.object;
    
    
        if ( [[NSString stringWithCharacters:&theChar length:1] isEqualToString:@"#"]) {
            DLog(@"This is a hashtag");
            theString = [theString stringByReplacingOccurrencesOfString:@"#" withString:@"%23"];
            NSURL *hashtagURL = [NSURL URLWithString:[NSString stringWithFormat:@"https://twitter.com/#!/search?q=%@", theString]];
            WebViewController *theWebVC = [[WebViewController alloc] init];
            theWebVC.request = [NSURLRequest requestWithURL:hashtagURL];
            UINavigationController *theNavigationVC = [[UINavigationController alloc] initWithRootViewController:theWebVC];
            [self presentModalViewController:theNavigationVC animated:YES];
    
        }
    
        if ( [[NSString stringWithCharacters:&theChar length:1] isEqualToString:@"@"]) {
            DLog(@"This is a Mention");
            theString = [theString stringByReplacingOccurrencesOfString:@"@" withString:@""];
            NSURL *mentionURL = [NSURL URLWithString:[NSString stringWithFormat:@"https://twitter.com/%@", theString]];
            WebViewController *theWebVC = [[WebViewController alloc] init];
            theWebVC.request = [NSURLRequest requestWithURL:mentionURL];
            UINavigationController *theNavigationVC = [[UINavigationController alloc] initWithRootViewController:theWebVC];
            [self presentModalViewController:theNavigationVC animated:YES];
    
        }
        if ( [[NSString stringWithCharacters:&theChar length:1] isEqualToString:@"h"]) {
            DLog(@"This is a hyperlink");
            theString = [[theString componentsSeparatedByString: @"\n"] objectAtIndex:0];
            NSURL *hyperlinkURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@", theString]];
            WebViewController *theWebVC = [[WebViewController alloc] init];
            theWebVC.request = [NSURLRequest requestWithURL:hyperlinkURL];
            UINavigationController *theNavigationVC = [[UINavigationController alloc] initWithRootViewController:theWebVC];
            [self presentModalViewController:theNavigationVC animated:YES];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using CI for the first time and i'm smashing my head with this seemingly
Using import datetime in python, is it possible to take a formatted time/date string
Using MVC2 I have an AJAX form which is posting to a bound model.
Using Core Data, I have a fetch request to fetch the minimum of a
Using SolrNet for querying & faceting. I have a combination of int, tdate and
using MSQL 2005 I have a continuous set of flow measurements (averaged for each
Using Java,I have to fetch multiple sets of values from an XML file to
Using MVVM. I have a DataTemplate which I am using to display an expander
using chrome and ff so far have made a nasty glitch when using scrollTo
Using EF Code First I have an model object that has multiple properties that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.