autoresizingmask

Resize UITableViewCell content when delete button shows up

▼魔方 西西 提交于 2019-12-18 05:12:10
问题 Is there any way to use autoresizing masks to move my content so that the delete button doesn't cover it up? Googling has told me that I need to set an autoresizing mask of UIViewAutoresizingFlexibleRightMargin on my subview. It seems to me like UIViewAutoresizingFlexibleWidth would actually make more sense; though I've tried them both and neither works. The view that I am trying to shrink is just a label that is a subview of the cell's contentView. I am unsure if the contentView itself

Resize UITableViewCell content when delete button shows up

我只是一个虾纸丫 提交于 2019-12-18 05:12:09
问题 Is there any way to use autoresizing masks to move my content so that the delete button doesn't cover it up? Googling has told me that I need to set an autoresizing mask of UIViewAutoresizingFlexibleRightMargin on my subview. It seems to me like UIViewAutoresizingFlexibleWidth would actually make more sense; though I've tried them both and neither works. The view that I am trying to shrink is just a label that is a subview of the cell's contentView. I am unsure if the contentView itself

Autoresizing masks programmatically vs Interface Builder / xib / nib

こ雲淡風輕ζ 提交于 2019-12-16 22:07:27
问题 I was in an (probably false) assumption that enabling the right margin indicator in xib is equivalent to using UIViewAutoresizingFlexibleLeftMargin inside code and so on. So, I used to think according to this snapshot: Later today I had to cross check, and stumbled upon this thread . And also the apple documentation, entitled with the section with title - "Handling Layout Changes Automatically Using Autoresizing Rules" in this link: https://developer.apple.com/library/content/documentation

Any other method to resize views, other than Auto-layout

China☆狼群 提交于 2019-12-13 05:46:47
问题 I am building an app, exclusively for iPhones and it only has a Portrait view. I have never used autolayout before and I don't think I have time to learn it now. Can I use anything else, to have my views resize themselves for the devices(iphone 4s, 5/5s, 6/6+)? 回答1: Remove the autolayout and sizeclasses And use autoresizing form utilities You can also do it by code : view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin); 来源: https://stackoverflow.com

Autoresizing Not Working Programmatically

可紊 提交于 2019-12-13 02:03:08
问题 I want to create a UIView which will resize it's width according to iPhone Screen size and it should be remain at bottom of view. I created fresh project with storyboard and add below code. Here is my code -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:true]; UIView *box = [[UIView alloc]initWithFrame:CGRectMake(0, 448, 320, 120)]; [box setBackgroundColor:[UIColor redColor]]; [box setAutoresizingMask:UIViewAutoresizingFlexibleHeight]; [box setAutoresizingMask

Migrating a project using autoresizing masks for iPhone X

女生的网名这么多〃 提交于 2019-12-12 08:59:09
问题 We have some legacy projects that are still using Autoresizing masks, and everything was working fine until iOS 11 and iPhone X. With the introduction of safe area layout guides, what's the best solution to support iPhone X? We can convert all interfaces with autoresizing masks to use auto-layouts. This appears to be a significant effort, considering views are being dynamically added and adjusted. We keep using autoresizing masks but adjust the interfaces to add inset margins for iPhone X and

Why do I not need to specify autoresizingMask for my custom UIViewController's root view?

允我心安 提交于 2019-12-12 02:47:43
问题 In my custom view controller I override loadView to programmatically set up my view hierarchy. To support auto-rotation I assign an appropriate value to the autoresizingMask property of all views in the hierarchy - except for the root view (the one that I assign to self.view ). Despite this omission, resizing on auto-rotation works perfectly (it feels so good to be finally able to say this ☺). I have tested in various simulators, and also on my iPhone and iPad devices. Does anyone know why

UIInterfaceOrientation not yet updated when UIDeviceOrientationDidChangeNotification caught in UIView

自作多情 提交于 2019-12-11 11:15:28
问题 I'm working on an open source library to provide an iMessage-like text input view - MessageComposerView (relevant to question). The view will stick to the keyboard like an inputAccessoryView and grow with text, but won't disappear when the keyboard does. I have recently run into a maddening issue when rotating this custom UIView that only appears if the view has been instantiated via initWithFrame . Basically at the point when a UIDeviceOrientationDidChangeNotification notification has been

When do autoresizing masks take effect in iOS?

≡放荡痞女 提交于 2019-12-10 15:13:57
问题 I have a nib that I originally created for an iPhone app with dimensions 320x480 and with autoresizing masks set up to expand the view in every direction should its superview be large. I am now making my app universal, and am using the same nib and showing it in a page sheet on the iPad. My problem is that I make some calculations based on the frame size, which is still showing 320x480. But in other methods, the frame size is showing correctly as the size of the page sheet. Question: When do

Problem setting autosizing in interface builder

我的梦境 提交于 2019-12-09 04:35:43
问题 I have two viewControllers, one is a subclass of UIViewController (autoresizes correctly), the other one is a subclass of a subclass of UIViewController. I did a layout in Interface Builder, I tested my code in the Simulator and everything works as expected. But if I rotate the device my views don't resize. So I went back to Interface Builder and found out that I cannot change the Resizing property of the "root"-UIView. So I opened another file and the resizing property is fixed there, too.