I have to do something wrong, but I donβt know what ..
I am trying to add a subView with this code:
subMenuView = [[UISubMenuViewMainController alloc] init]; [subMenuView.view setFrame:CGRectMake(10,0,990,100)]; subMenuView.view.backgroundColor = [UIColor whiteColor]; [self.view addSubview:subMenuView.view];
I want my view to be at (10.0) and have 990/100 in width / height
but I do not get the expected result
Let me if I am wrong. If I want a 10x10 square view in the center, I need to add the following line:
[subMenuView.view setFrame:CGRectMake(512,384,10,10)]
This is not what I get, the position is correct, but the width / height is wrong, any ideas?
source share