I can't seem to figure out what I'm doing wrong here. I want to stick a UIView in the bottom right corner of the screen, but the alignment is off. In my view did load I have...$
int size = 50;
CGRect frame = CGRectMake(self.view.frame.size.width - (size + 10), self.view.frame.size.height - (size + 10), size, size);
UIView *colorView = [[UIView alloc]initWithFrame:frame];
colorView.layer.cornerRadius = size / 2;
colorView.layer.masksToBounds = YES;
colorView.backgroundColor = ColorDarkGray;
[self.view addSubview:colorView];
Now to me, this should be putting the view in the bottom right corner with a bit of padding. But it is completely off the screen. I have auto layout shut off, and I'm just stuck. Could someone please help me figure this out.
self.view.frame
at this point? Depending where you implemented this, it may be thatself.view
has not yet been lay out. – Guillaume Algis