Expected identifer

Have been trying to find the error in one line of code. Return expected identifier error which has been commented out.

Can you help me to find the error? Thank you.

Sorry for the bad code formatting; don't know how to get it right here.

   #import "BIDAppDelegate.h"
   #import "BIDSwitchViewController.h"

   @implementation BIDAppDelegate

   @synthesize window = _window;
   @synthesize switchViewController;

   - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary    *)launchOptions
    {
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        // Override point for customization after application launch.
        self.switchViewController = [[BIDSwitchViewController alloc]

                                 initWithNibName:@"Switch View" 
    bundle:nil];
        UIView *switchView = self.switchViewController.view;
        CGRect switchViewFrame = switchView.frame;
        switchViewFrame.origin.y += [[UIApplication sharedApplication].statusBarFrame.size.height; //    Expected identifier

    switchView.frame = switchViewFrame;
                                     [self.window addSubview:switchView];

        self.window.backgroundColor = [UIColor whiteColor];
        [self.window makeKeyAndVisible];
        return YES;
    }

Answers


You have an extra [ at the start of the offending statement. :[[UIApplication sharedApplication] should be [UIApplication sharedApplication]

To format code, paste it in, select it and press the {} button at the top of the question editor.


Need Your Help

Allow Users to Create their Own Attributes within a templatized Model

ruby-on-rails activerecord csv time-series

I'm trying to create a data visualization site for time series data.

object_detection using opencv in c/c++ on eclipse

c++ eclipse opencv

I am trying to detect faces and eyes from a video captured by webcam. I am using eclipse and opencv-2.3.1 on ubuntu 11.10. I want to write this code in C/C++. I configured eclipse by looking at the

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.