Search Results

Search found 10 results on 1 pages for 'techfusion'.

Page 1/1 | 1 

  • How load WebView with another URL when navigated through tab bar viewController

    - by TechFusion
    Hello, I have created window based application, root controller as Tab bar controller. WebView is being loaded in Tab bar interfaced ViewController's View.WebView is created using IB.WebView object declared in ViewController as per below. //ViewController.h @interface ViewController:UIViewController{ IBOutlet UIWebview *Webview; } @property(nonatomic,retain)IBOutlet UIWebview *Webview; @end I am calling [WebView loadrequest] method in -viewDidLoad method and stopLoading will be called in -viewWillDisappear method. I am again reload it in -viewWillAppear:animated method to load it again when tab bar is pressed. //ViewController.m @implementation viewcontroller @synthesize Webview; -(void)viewDidLoad{ [super viewDidLoad]; [self.Webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"www.apple.com"]]]; } -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [self.Webview reload]; } -(void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated]; [self.Webview stopLoading]; } I am releasing WebView in -ViewDidUnload method -(void)viewDidUnload{ [super viewDidUnload]; [Webview release]; } -(void)dealloc{ [Webview release]; [super dealloc]; } Does Webview released correctly ? Here how to kill connection with URL when ViewWillDisappear method called ? How to load View with Different URL then it's loaded in -viewDidLoad method when ViewController interfaced tab is pressed ? Means if naviagated from one tab to another that ViewController interface tab which has WebView should load request with another URL. Does it correct to call [self.Webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"www.stackoverflow.com"]]]; this method again in -viewWillAppear:animated method to load with another URL ? Thanks,

    Read the article

  • How to use NSMutableDictionary to store and retrieve data

    - by TechFusion
    I have created Window Based application and tab bar controller as root controller. My objective is to store Text Field data values in one tab bar VC and will be accessible and editable by other VC and also retrievable when application start. I am looking to use NSMutableDictionary class in AppDelegate so that I can access stored Data Values with keys. //TestAppDelegate.h extern NSString *kNamekey ; extern NSString *kUserIDkey ; extern NSString *kPasswordkey ; @interface TestAppDelegate :NSObject{ UIWindow *window; IBOutlet UITabBarController *rootController; NSMutableDictionary *outlineData ; } @property(nonatomic,retain)IBOutlet UIWindow *window; @property(nonatomic,retain)IBOutlet UITabBarController *rootController; @property(nonatomic,retain) NSMutableDictionary *outlineData ; @end //TestAppDelegate.m import "TestAppDelegate.h" NSString *kNamekey =@"Namekey"; NSString *kUserIDkey =@"UserIDkey"; NSString *kPasswordkey =@"Passwordkey"; @implemetation TestAppDelegate @synthesize outlineData ; -(void)applicationDidFinishLaunching:(UIApplication)application { NSMutableDictionary *tempMutableCopy = [[[NSUserDefaults standardUserDefaults] objectForKey:kRestoreLocationKey] mutableCopy]; self.outlineData = tempMutableCopy; [tempMutableCopy release]; if(outlineData == nil){ NSString *NameDefault = NULL; NSString *UserIDdefault= NULL; NSString *Passworddefault= NULL; NSMutableDictionary *appDefaults = [NSMutableDictionary dictionaryWithObjectsAndKeys: NameDefault, kNamekey , UserIDdefault, kUserIDkey , Passworddefault, kPasswordkey , nil]; self.outlineData = appDefaults; [appDefaults release]; } [window addSubview:rootController.view]; [window makeKeyAndVisible]; NSMutableDictionary *savedLocationDict = [NSMutableDictionary dictionaryWithObject:outlineData forKey:kRestoreLocationKey]; [[NSUserDefaults standardUserDefaults] registerDefaults:savedLocationDict]; [[NSUserDefaults standardUserDefaults] synchronize]; } -(void)applicationWillTerminate:(UIApplication *)application { [[NSUserDefaults standardUserDefaults] setObject:outlineData forKey:kRestoreLocationKey]; } @end Here ViewController is ViewController of Navigation Controller which is attached with one tab bar.. I have attached xib file with ViewController //ViewController.h @interface IBOutlet UITextField *Name; IBOutlet UITextField *UserId; IBOutlet UITextField *Password; } @property(retain,nonatomic) IBOutlet UITextField *Name @property(retain,nonatomic) IBOutlet UITextField *UserId; @property(retain,nonatomic) IBOutlet UITextField *Password; -(IBAction)Save:(id)sender; @end Here in ViewController.m, I am storing object values with keys. /ViewController.m -(IBAction)Save:(id)sender{ TestAppDelegate appDelegate = (TestAppDelegate)[[UIApplication sharedApplication] delegate]; [appDelegate.outlineData setObject:Name.text forKey:kNamekey ]; [appDelegate.outlineData setObject:UserId.text forKey:kUserIDkey ]; [appDelegate.outlineData setObject:Password.text forKey:kPasswordkey]; [[NSUserDefaults standardUserDefaults] synchronize]; } I am accessing stored object using following method. -(void)loadData { TabBarAppDelegate *appDelegate = (TabBarAppDelegate *)[[UIApplication sharedApplication] delegate]; Name = [appDelegate.outlineData objectForKey:kNamekey ]; UserId = [appDelegate.outlineData objectForKey:kUserIDkey ]; Password = [appDelegate.outlineData objectForKey:kPasswordkey]; [Name release]; [UserId release]; [Password release]; } I am getting EXEC_BAD_ACCESS in application. Where I am making mistake ? Thanks,

    Read the article

  • How to create Dictionary object in AppDelegate to access objectkey in another ViewController

    - by TechFusion
    Hello, I have created Window Based application and tab bar controller as root controller. My objective is to store Text Field data values in one tab bar VC and will be accessible and editable by other VC and also retrievable when application start. I am looking to use NSDictionary class in AppDelegate so that I can access stroed Data Values with keys. //TestAppDelegate.h @interface { ..... .... NSDictionary *Data; } @property (nonatomic, retain) NSDictionary *Data; //TestAppDelegate.m #import "TestAppDelegate.h" NSString *kNamekey =@"Namekey"; NSString *kUserIDkey =@"UserIDkey"; NSString *kPasswordkey =@"Passwordkey"; @implemetation TestAppDelegate @synthesize Data; -(void)applicationDidFinishLaunching:(UIApplication)application { NSString *NameDefault; NSString *UserIDdefault; NSString *Passworddefault; NSString *testvalue = [[NSUserDefaults standardUserDefaults] stringForKey: kNamekey]; if(testvalue == nil) { NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: NameDefault, kNamekey, UserIdefault kUserIDkey, Passwordefault kPasswordkey, nil]; self.Data = appDefaults; [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; [[NSUserDefaults standardUserDefaults] synchronize]; } else { } } Here ViewController is ViewController of Navigation Controller which is attached with one tab bar.. I have attached xib file with ViewController //ViewController.h @interface IBOutlet UITextField *Name; IBOutlet UITextField *UserId; IBOutlet UITextField *Password; } @property(retain,nonatomic) IBOutlet UITextField *Name @property(retain,nonatomic) IBOutlet UITextField *UserId; @property(retain,nonatomic) IBOutlet UITextField *Password; -(IBAction)Save:(id)sender; @end Here in ViewController.m I want to store Text Field input data with key which are defined in AppDelegate. I have linked Save Barbutton with action. Here I am not getting how to access NSDictionary class with object and keys in ViewController. //ViewController.m -(IBAction)Save:(id)sender{ TestAppDelegate *appDelegate = (TestAppDelegate*)[[UIApplication sharedApplication] delegate]; //Here how to access knamekey here to set object(Name.test) value with key } Please guide me about this. Thanks,

    Read the article

  • How to add View Controller with Tab Bar interfaced View Controller

    - by TechFusion
    I have created Window based Tab Bar controller app, One Tab Bar of viewController has been interfaced with WebVIew ..I am looking to create another view once touch event happened in that WebView.. //TabBarViewController.m - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { TabMainView *mainView = [[TabMainView alloc] init]; mainView.hidesBottomBarWhenPushed = YES; [self.navigationController pushViewController: mainView animated:YES]; [mainView release]; } I have created MainView, which is UIViewController Subclass. //TabMainView.m - (void)loadView { CGRect frame = CGRectMake(0.0, 0.0, 480, 320); WebView = [[[UIWebView alloc] initWithFrame:frame] autorelease]; WebView.backgroundColor = [UIColor whiteColor]; WebView.scalesPageToFit = YES; WebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin); WebView.autoresizesSubviews = YES; WebView.exclusiveTouch = YES; //self.WebView.UserInteractionEnabled = NO; WebView.clearsContextBeforeDrawing = YES; self.view = WebView; [WebView release]; } - (void)viewWillAppear:(BOOL)animated { [self.WebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com"]]]; } Here when touch event happened then it is not passing control to TabMainView.m 's Viewload function although I am pushing it's view? TabBarView is also UIViewController subclass not a UINavigationController.

    Read the article

  • Custom back button click event on pushed view controller

    - by TechFusion
    Hello, I have pushed view controller and load WebView and Custom rectangular rounded button on right down left corner into view using programmatic way. -(void)loadView { CGRect frame = CGRectMake(0.0, 0.0, 480, 320); WebView = [[[UIWebView alloc] initWithFrame:frame] autorelease]; WebView.backgroundColor = [UIColor whiteColor]; WebView.scalesPageToFit = YES; WebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin); WebView.autoresizesSubviews = YES; WebView.exclusiveTouch = YES; WebView.clearsContextBeforeDrawing = YES; self.roundedButtonType = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; self.roundedButtonType.frame = CGRectMake(416.0, 270.0, 44, 19); [self.roundedButtonType setTitle:@"Back" forState:UIControlStateNormal]; self.roundedButtonType.backgroundColor = [UIColor grayColor]; [self.roundedButtonType addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside]; self.view = WebView; [self.view addSubview: self.roundedButtonType ]; [WebView release]; } This is action that I have added as back button of navigation. -(void)back:(id)sender{ [self.navigationController popViewControllerAnimated:YES]; } -(void)viewDidUnload{ self.WebView = nil; self.roundedButtonType = nil; } -(void)dealloc{ [roundedButtonType release]; [super dealloc]; } Here, When Back button click then it is showing previous view but application got stuck in that view and GDB shows Program received signal :EXC_BAD_ACCESS message. how resolve this issue? Thanks,

    Read the article

  • Scale down WebView content in iphone App

    - by TechFusion
    Hello, I am looking to display multiple web content in one main view. I have created different WebView and make it's height and width to fit all in one view size of Landscape mode. How to scale down web view content to show data in small size (as per WebView height and width) ? I have built application using Interface builder.The view is interface with one tab bar of tab bar controller. Thanks,

    Read the article

  • How to set interface method between two viewController to pass paramter in Navigation Controller

    - by TechFusion
    Hello, I have created Window based application, root controller as Tab Bar controller. One Tab bar has Navigation controller. Navigation controller's ViewControlller implementation, I am pushing Viewcontroller. I am looking to pass parameter from Navigation Controller's View controller to pushed View Controller. I have tried to pass as per below method. //ViewController.h @interface ViewController:UIViewController{ NSString *String; } @property(copy, nonatomic)NSString *String; @end //ViewController.m #import "ViewController1.h" ViewController1 *level1view = [[ViewController alloc]init]; level1view.hideBottomBarWhenPushed = YES; level1view.theString = String; [self.navigationController pushViewController:level1view animated:YES]; [level1view release]; //ViewController1.h NSString *theString; @property(copy, nonatomic)NSString *theString; This is working fine. but I want to pass more than one parameter like Integer and UITextFiled Values so how to do that? Is there any Apple Doc that I can get idea about this? Thanks,

    Read the article

  • How to retrive user input data entered tab bar View Controller when application start in iphone app

    - by TechFusion
    Hello, I have created window based application. Tab bar controller as root controller and it has three tabs. One Tab has Labels and TextFiled inputs like Name, Username and Password. I am looking to store this text filed inputs when user enters and able retrieve in other tabs. Previously I have set key for different text fields and setobject:withkey task and able to retrive text filed values in same view Controller [[NSUserDefaults standardUserDefaults] stringForKey:key] task. Now I am looking to create database which has different objects and each objects has data values of different Text Field inputs that I can access in whole application. like DatabaseName - Object1 - Name, Username & Password - Object2 - Name, Username & Password Something like structure in Normal C so it would be easy to retrieve data. I am looking NSUserDefaults Class and User Defaults Programming Topics in Cocoa(http://developer.apple.com/iPhone/library/documentation/Cocoa/Conceptual/UserDefaults/UserDefaults.html#//apple_ref/doc/uid/10000059-BCIDJFHD). Also Referring Archives and Serialization Programming guide(http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/Archiving/Archiving.html#//apple_ref/doc/uid/10000047i). Which method i need to use to create such type of database ? Thanks,

    Read the article

1