Trouble in XCode-Expected declaration or statement at end of input

This is a discussion on Trouble in XCode-Expected declaration or statement at end of input within the C Programming forums, part of the General Programming Boards category; Im a starting to learn to develop iOS apps, and i have this codes, and it appear that it has ...

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    1

    Exclamation Trouble in XCode-Expected declaration or statement at end of input

    Im a starting to learn to develop iOS apps, and i have this codes, and it appear that it has a problem.... Please HELP!!!


    #import <UIKit/UIKit.h>

    int main(int argc, char *argv[]) {

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;

    @implementation UntitledViewController

    @synthesize webView, adressBar, activityIndicator;

    -(void)viewDidLoad {
    [super viewDidLoad];
    NSString *urlAdress = @"google.com";

    NSURL *url = [NSURL URLWithString:urlAdress];
    NSURLRequest *request0bj = [NSURLRequest requestWithURL:url];

    [webview loadRequest:request0bj];
    [adressBar serText:urlAdress];

    }

    -(IBAction)gotoAdressid) sender {
    NSURL *url = [[NSURL URLWithString:[adressBar text]];
    NSURLRequest *request0bj = [NSURLRequest requestWithURL:url];

    //Load the request in the UIWebview.
    [webView loadRequest:request0bj];
    [adressBar resignFirstResponder];
    }

    -(IBAction)goBackid)sender {
    [webView goBack];
    }

    -(IBAction) goForwardid)sender {
    [webView goForward];
    }

    - (void)WebviewDidStartLoadUIWebView *)webView {
    [activityIndicator startAnimating];
    }

    -(void)webViewdidFinishLoadUIWebView *)webView {
    [activityIndicator stopAnimating];
    }

    - (BOOL)webViewUIWebView*)webView shouldStartLoadingWithRequestNSURLRequest*)request
    navigationTypeUIWebViewNavigationType)navigationType {

    if (navigationType == UIWebViewNavigationTypeLinkClicked) {
    NSURL *URL = [request URL];
    if ([[URL scheme] isEqualToString:@"http"]) {
    [adressBar setText:[URL absoluteString]];
    [self gotoAdress:nil];
    }
    return NO;
    }
    return YES;
    }
    @end

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    This isn't even C code...
    Methinks yer askin' in the wrong place.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can someone help me with these errors please code included
    By geekrockergal in forum C Programming
    Replies: 7
    Last Post: 02-10-2009, 02:20 PM
  2. Input statement problem
    By une in forum C Programming
    Replies: 3
    Last Post: 05-30-2007, 12:16 AM
  3. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-30-2005, 12:21 AM
  4. Windows using Dev-C++
    By Renegade in forum C++ Programming
    Replies: 15
    Last Post: 07-07-2005, 09:29 PM
  5. having trouble understanding this statement
    By kes103 in forum C++ Programming
    Replies: 2
    Last Post: 10-03-2003, 10:00 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21