i am new to ios develepoment
i have created a function name list which is called after a button is clicked it should load a view dynamically this is my code
-(IBAction)list:(id)sender{
UIView *listView=[[UIView alloc]initWithFrame:CGRectMake(0,0,1024,786)];
[self.view addSubview:listView];
}
but it does not create any view but it calls this function
can anyone help me
Thanks.
Arun
There is not any problem with your code, It will work fine.
You just check two thing
Make some background color in your view
[
listView setBackgroundColor: [UIColor redColor]];You have proper
IBActionconnection on your buttonIf you getting
redColoron yourViewmeanlistViewis adding over your view.EDIT
If your want to add
UILabelandUIButtonin your view then