autoresizingmask

Resize UITableViewCell content when delete button shows up

坚强是说给别人听的谎言 提交于 2019-11-29 07:49:35
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 automatically resizes when the delete button shows up; but it seems like it isn't; otherwise my autoresizing

Unable to handle orientation in iOS 6?

隐身守侯 提交于 2019-11-28 17:05:14
I am using - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation delegate to change the frame of my view based on the orientation type i.e., if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { self.view.frame=CGRectMake(0,0,500,300); } else { self.view.frame=CGRectMake(0,0,300,400); } How to handle the same situation in iOS 6 as -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation has been deprecated in iOS6. I am using the following delegate to set all the orientations. -(NSUInteger

xcode/iOS: Autoresize to fill a view - explicit frame size is essential?

时光毁灭记忆、已成空白 提交于 2019-11-28 16:41:26
I would like a UITextView to fill its superView , which is a plain UIView inside a UIViewController instance. It seems that I cannot make the UITextView do this solely by using the API-specified properties of autoresizingMask and autoresizesSubviews . Setting these as shown here does nothing; the UITextView remains small even though its superView fills the screen. // use existing instantiated view inside view controller; // ensure autosizing enabled self.view.autoresizesSubviews = YES; self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight| UIViewAutoresizingFlexibleWidth; // create

iOS6 iPhone 5 nothing clickable at bottom of screen

邮差的信 提交于 2019-11-28 07:37:26
I have an app I am trying to convert and make ready for the new iPhone 5 screen size. I added the new Default-568h@2x image and I set my views to autosize in IB. The views look right, they stretch to fill the screen, but any button I put at the bottom is unclickable. It's like there is an invisible line towards the bottom, about where the old iPhone screen would stop, and anything below that line is unclickable. If I put the button right on this line, the top part is clickable but the bottom part is not. I had the same problem... http://anthonyprato.com/2012/09/20/iphone-5-problem-with-touches

iOS 7 Custom UINavigationBar TitleView moves when Pushing or Popping new View Controller

余生长醉 提交于 2019-11-28 02:27:46
问题 I am using a custom title view for a UINavigationBar with the following code: // Set a label to the nav bar THLabel *titleLabel = [[THLabel alloc] init]; titleLabel.text = @"Test"; titleLabel.font = [UIFont fontWithName:APP_FONT size:22.0]; titleLabel.frame = CGRectMake(0, 0, 100, 30); titleLabel.textAlignment = NSTextAlignmentCenter; titleLabel.textColor = CUSTOM_LIGHT_BLUE; titleLabel.strokeColor = kStrokeColor; titleLabel.strokeSize = kStrokeSize; self.navigationItem.titleView = titleLabel

Unable to handle orientation in iOS 6?

为君一笑 提交于 2019-11-27 20:05:39
问题 I am using - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation delegate to change the frame of my view based on the orientation type i.e., if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { self.view.frame=CGRectMake(0,0,500,300); } else { self.view.frame=CGRectMake(0,0,300,400); } How to handle the same situation in iOS 6 as -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation has been deprecated in iOS6

iOS Autolayout and UIToolbar/UIBarButtonItems

让人想犯罪 __ 提交于 2019-11-27 14:19:21
I have an iOS view with autolayout enabled and have a UIToolbar with a UISearchBar and UISegmentControl contained with the toolbar. I want the UISearchBar to have a flexible width so I need to add a constraint to force this, but from what I can tell you cannot add constraints to items in a UIToolbar in Interface Builder. The options are all disabled. Before AutoLayout I would accomplish this with autoresizingmasks . Are constraints not allowed within UIToolbars/UINavigationBars ? How else can this be accomplished when using autolayout? snorock Autolayout constraints only work with UIViews and

xcode/iOS: Autoresize to fill a view - explicit frame size is essential?

梦想的初衷 提交于 2019-11-27 09:50:51
问题 I would like a UITextView to fill its superView , which is a plain UIView inside a UIViewController instance. It seems that I cannot make the UITextView do this solely by using the API-specified properties of autoresizingMask and autoresizesSubviews . Setting these as shown here does nothing; the UITextView remains small even though its superView fills the screen. // use existing instantiated view inside view controller; // ensure autosizing enabled self.view.autoresizesSubviews = YES; self

iOS6 iPhone 5 nothing clickable at bottom of screen

≯℡__Kan透↙ 提交于 2019-11-27 05:45:02
问题 I have an app I am trying to convert and make ready for the new iPhone 5 screen size. I added the new Default-568h@2x image and I set my views to autosize in IB. The views look right, they stretch to fill the screen, but any button I put at the bottom is unclickable. It's like there is an invisible line towards the bottom, about where the old iPhone screen would stop, and anything below that line is unclickable. If I put the button right on this line, the top part is clickable but the bottom

Unable to simultaneously satisfy constraints - No constraints in place

北城以北 提交于 2019-11-26 23:58:16
I have gone through and removed every single user constraint yet I am still getting the following error ONLY after I rotate the device. I have absolutely no clue why though. Does anyone have any ideas? 2013-01-14 21:30:31.363 myApp[35869:c07] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints