开发者

onLoad IBAction SubmitB

i got a problem... i have a button.. when i click on the button, the function

-(IBAction)SubmitB; 
{
        self.String = textdata.text;
        NSString *nameString = String;

        NSString* AUrl = [NSStr开发者_JAVA百科ing stringWithFormat:@"%@", nameString];
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:AUrl]];

}

will be activate.

It sounds dump... but i want to activate it without pressing the button... in this example you click on a button and the textfield sends the data to the String variable... but he have to send the data if the app is loaded

Thanks


... well from what I understand, why don't you put your code into didFinishLaunchingWithOptions? Something like:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    NSString *nameString = @"whatever";

    NSString* AUrl = [NSString stringWithFormat:@"%@", nameString];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:AUrl]];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜