objective c - iOS Link to external page -


having read this thread, i'm trying insert link external web page calling action upon touch inside on button (button created in storyboard xcode 4.6).

this action:

-(ibaction)outlink:(id)sender {     [[uiapplication sharedapplication] openurl:[nsurl urlwithstring: @"https://www.mysite.com/index.php"]]; } 

and header file (.h):

@interface menuviewcontroller : uiviewcontroller <uitableviewdatasource, uitabbarcontrollerdelegate>{     iboutlet uibutton *linktosite; }  -(ibaction)outlink; 

i have linked button element in storyboard, , i've linked action touch inside event, error when click in simulator on button:

terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[menuviewcontroller outlink]: unrecognized selector sent instance 0x717d340' 

change method name in .h class , reconnect outlet touchupinside event.

-(ibaction)outlink:(id)sender; 

hope helps you.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

How to call a javascript function after the page loads with a chrome extension? -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -