Data grids? I want to be able to display a report!

Discussion in 'iPad Development' started by Myriad_Rocker, Jul 29, 2010.

  1. Myriad_Rocker

    Myriad_Rocker
    Expand Collapse
    iPF Noob

    Joined:
    Jul 29, 2010
    Messages:
    6
    Thanks Received:
    0
    Okay, so I can get it to work except for the webview. I'm just trying to pull up Google in it right now.

    I have it doing it when I click a button but it's not working. Here's my code...

    Code:
    #import "ViewController.h"
    
    
    @implementation ViewController
    
    @synthesize textField;
    @synthesize label;
    @synthesize string;
    @synthesize pictureWebView;
    
    - (IBAction)updateList:(id)sender {
        
        // Tell the UIWebView to load the page
        NSString *webLink = @"http://www.google.com";
        NSURL *webURL = [NSURL URLWithString:webLink];
        NSURLRequest *requestStory = [NSURLRequest requestWithURL:webURL];
        [pictureWebView loadRequest:requestStory];
        
        self.string = textField.text;
        NSString *nameString = string;
        
        if ([nameString length] == 0) {
            nameString = @"<";
        }
        NSString *update = [[NSString alloc] initWithFormat:@"Store # %@", nameString];
        label.text = update;
        [update release];
        
    }
    
    - (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
        if (theTextField == textField) {
            [textField resignFirstResponder];
        }
        return YES;
    }
    
    Then on down below that, I have it releasing:

    Code:
    - (void)dealloc {
        [textField release];
        [label release];
        [string release];
        [pictureWebView release];
        [super dealloc];
    }
    
    And here's the h file...

    Code:
    #import <UIKit/UIKit.h>
    
    
    @interface ViewController : UIViewController {
        UITextField *textField;
        UILabel *label;
        NSString *string;
        UIWebView *pictureWebView;
        
    }
    
    @property (nonatomic, retain) IBOutlet UITextField *textField;
    @property (nonatomic, retain) IBOutlet UILabel *label;
    @property (nonatomic, copy) NSString *string;
    @property (nonatomic, retain) UIWebView *pictureWebView;
    
    - (IBAction)updateList: (id)sender;
    
    @end
    
    FINALLY...one question.

    Is there like a "page load" kind of event where I can load up an initial default page in the webview before I try passing it a "Store #"? Hope that made sense.
     
  2. MikesTooLz

    MikesTooLz
    Expand Collapse
    iPad Ninja

    Joined:
    May 7, 2010
    Messages:
    2,361
    Thanks Received:
    20
    Myriad_Rocker check your private message.
     
  3. MikesTooLz

    MikesTooLz
    Expand Collapse
    iPad Ninja

    Joined:
    May 7, 2010
    Messages:
    2,361
    Thanks Received:
    20
    Let me know if you ever got my email.
     

Share This Page


Search tags for this page
asp.net datagrid on ipad safari
,
data grids on ipad
,
display data grid xcode
,
how to populate cellular data number
,

ios data grid

,
ipad app on data grid
,
ipad data grid display
,
ipad data grids
,

ipad datagrid

,
make a datagrid in ipad