Monday, September 26, 2022
HomeiOS DevelopmentHow to pass the query string value in (;) launchview objective c...

How to pass the query string value in ([self.launchview setAlpha:1];) launchview objective c using cordova ios

[ad_1]

**I have finished the app using Cordova web view, but the problem is how to pass the query string value in ios mainwebviewcontroller.m using cordova app? **

#import "MainViewController.h"

@implementation MainViewController

- (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Uncomment to override the CDVCommandDelegateImpl used
        // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self];
        // Uncomment to override the CDVCommandQueue used
        // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self];
    }
    return self;
}

- (id)init
{
    self = [super init];
    if (self) {
        // Uncomment to override the CDVCommandDelegateImpl used
        // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self];
        // Uncomment to override the CDVCommandQueue used
        // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self];
    }
    return self;
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

#pragma mark View lifecycle

- (void)viewWillAppear:(BOOL)animated
{
    // View defaults to full size.  If you want to customize the view's size, or its subviews (e.g. webView),
    // you can do so here.

    [super viewWillAppear:animated];
}

*- (void)viewDidLoad
{
    [super viewDidLoad];
 // Do any additional setup after loading the view from its nib.
     NSString *test1=@"This";
   NSString *test2=@"is";
   NSString *test3=@"my";
    NSString *test4=@"Test";
NSArray *myStrings = [[NSArray alloc] initWithObjects:test1, test2, test3, test4, nil];
NSString *joinedString = [myStrings componentsJoinedByString:@"&"];
    
NSArray *myStrings = [[NSArray alloc] initWithObjects:test1, test2, test3, test4, nil];
NSString *joinedString = [myStrings componentsJoinedByString:@"|"];

*launchurl with querystring*
    [self.launchview setAlpha:1];*
   
}

@end

@implementation MainCommandDelegate

/* To override the methods, uncomment the line in the init function(s)
   in MainViewController.m
 */

#pragma mark CDVCommandDelegate implementation

- (id)getCommandInstance:(NSString*)className
{
    return [super getCommandInstance:className];
}

- (NSString*)pathForResource:(NSString*)resourcepath
{
    return [super pathForResource:resourcepath];
}

@end

@implementation MainCommandQueue

/* To override, uncomment the line in the init function(s)
   in MainViewController.m
 */
- (BOOL)execute:(CDVInvokedUrlCommand*)command
{
    return [super execute:command];
}

@end

*- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
NSString *test1=@”This”;
NSString *test2=@”is”;
NSString *test3=@”my”;
NSString *test4=@”Test”;
NSArray *myStrings = [[NSArray alloc] initWithObjects:test1, test2, test3, test4, nil];
NSString *joinedString = [myStrings componentsJoinedByString:@”&”];

NSArray *myStrings = [[NSArray alloc] initWithObjects:test1, test2, test3, test4, nil];
NSString *joinedString = [myStrings componentsJoinedByString:@"|"];

*launchurl with querystring*
    [self.launchview setAlpha:1];*

i was struggle to([self.launchview setAlpha:1]+adding querystring_value) anybody can help me

[ad_2]

Source link

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments