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

  1. #1
    Registered User
    Join Date
    Mar 2011

    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 = @"";

    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;

  2. #2
    Join Date
    Aug 2010
    Ontario Canada
    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-29-2007, 11:16 PM
  3. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  4. Windows using Dev-C++
    By Renegade in forum C++ Programming
    Replies: 15
    Last Post: 07-07-2005, 08:29 PM
  5. having trouble understanding this statement
    By kes103 in forum C++ Programming
    Replies: 2
    Last Post: 10-03-2003, 09:00 AM

Tags for this Thread