Mile Mile - 2 years ago 80
iOS Question

Re: How Do I Make A Count For The Amount Of Times A Certain URL Was Open From A Different Web View?

I changed up the question because the last question wasn't clear enough.

I want to implement this for the amount of times a certain URL was open. I need the count for when a certain URL is opened from another URL that I set in a UIWebView. Thanks in advance.

Here is my code:

int Number;

Number += 10;
Label.text = [NSString stringWithFormat:@"%d”, Number];

Answer Source

Do something like the following:

- (void)openURL:(UIButton *)sender
    NSString *url = //URL;
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
    Number += 1;
    Label.text = [NSString stringWithFormat:@"%d", Number];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download