Center another nib

Discussion in 'iOS Programming' started by Nnavick, Apr 1, 2011.

  1. macrumors regular

    Joined:
    Oct 13, 2010
    #1
    I called another Nib class from my first view

    Code:
    LoginRegister *viewController = [[LoginRegister alloc] initWithNibName:@"LoginRegister" bundle:nil];
    	self.loginRegister = viewController;
    	[viewController release];
       UIView *newView = loginRegister.view;
        [animationClass SetAlphaView:newView :0.5 :1];
        [self.view addSubview:newView];
    
    the second view size is 242X225 ,
    when I call it it's appears at the upper left corner and I tried to align it

    Code:
     newView.center=CGPointMake(121, 112);
    but it's not working,
    what should I do?

    Thanks
     

Share This Page