ios6

Auto Layout for tableHeaderView

走远了吗. 提交于 2019-12-05 22:12:17
I've been trying to improve my layout techniques by learning Auto Layout, but I've stumbled across an issue that I just haven't been able to solve. Here's what happens: there's a view controller containing, among other things, a UITableView and a UIView . This view is placed just below the table view, and its height does not extend to the full screen height (let's say it takes up the top half of it). The table view, using a grouped style and placed just above the mentioned view, has a translucent background, so that you can actually see the contents of the view just below it. Since the view

In IOS 6 on iPad, initial rotation is always portrait, after that it always rotates correctly

谁说胖子不能爱 提交于 2019-12-05 22:11:21
In a shipping app that has worked correctly under iOS 5.X and supports all orientations, built against iOS 6 it always starts in portrait even when the ipad/simulator is in landscape). I did add the new rotation methods - (BOOL)shouldAutorotate NS_AVAILABLE_IOS(6_0); - (NSUInteger)supportedInterfaceOrientations NS_AVAILABLE_IOS(6_0); but that makes no difference. Note we do not use a navigation controller as the root view controller. Otherwise the app rotates correctly after the initial problem. The root view controller handles all the decision making for rotations and is added to the main

UIImageview programmilly manage for iphone5 and iphone4

て烟熏妆下的殇ゞ 提交于 2019-12-05 21:25:12
I have an Issue about UIImageView Manage by XIB file for iphone5 screen Height and Iphone4 Screen Height. I Try to Manage code for UIImageView like this ~ CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height; if ([UIScreen mainScreen].scale == 2.f && screenHeight == 568.0f) { backgroundImage.autoresizingMask=UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth; frameView.autoresizingMask=UIViewAutoresizingFlexibleHeight; backgroundImage.image = [UIImage imageNamed:@"bg-568h@2x.png"]; //frameView.frame=CGRectMake(16, 0, 288, 527); frameView.image = [UIImage imageNamed:@

On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480?

▼魔方 西西 提交于 2019-12-05 21:11:59
问题 On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480. Why. In all the posts I'm reading, people are saying that it returns the correct screen size. What is going on here? Am I missing something in the .plist file or something? BTW I am hand coding the GUI, so there is no XIB. 回答1: Unless your app includes a Default-568h.png in it's bundle, it will run inside a 480 point high legacy screen sandbox on the iPhone 5, and can't draw or see any dimensions outside that sandbox. Note

UITextView contentInset is not working

…衆ロ難τιáo~ 提交于 2019-12-05 20:53:11
I'm displaying text inside UITextView. I need to apply some padding to text. When i use value for top position it's working. If i use value for other position it's not working. txtt_bgImage = [UIImage imageNamed:@"txtt_bg_ipad.png"]; txtt_bgImageView = [[UIImageView alloc] initWithImage:txtt_bgImage]; txtt=[[UITextView alloc]initWithFrame:CGRectMake(170, 300, 400, 250)]; txtt.text=productDescription; [txtt setFont: [UIFont fontWithName:@"verdana" size:15]]; txtt.textColor=[UIColor whiteColor]; [txtt setBackgroundColor:[UIColor clearColor]]; txtt.contentInset = UIEdgeInsetsMake(15,0,0,0); //

how to get page to curl like in Apple Maps on iOS 6?

て烟熏妆下的殇ゞ 提交于 2019-12-05 19:31:02
How would I get my page to curl up as it does in the new apple maps? I know how to make it curl up to see another page but I'm talking about the curl in the bottom right corner of the map. Here is a pic if you want to see what I'm talking about: To display this curly corner, simply use a PNG image (which contains the curly white part with its gradient and shadow + the gray background part of the supposed below view, the rest of the PNG being transparent -- similar to this one found via Google Image for example ). You can then use this image as the backgroundImage of a UIButton -- or as the

How to add Facebook, twitter, mail, message icons in UIactivityviewcontroller

自闭症网瘾萝莉.ら 提交于 2019-12-05 19:23:53
Have added activityviewcontroller to the main controller -(void)ActionSheet2:(id)sender { UIActivityViewController *activityViewController = [[UIActivityViewController alloc] init]; activityViewController.excludedActivityTypes = @[UIActivityTypePostToWeibo, UIActivityTypeAssignToContact ]; [self presentViewController:activityViewController animated:YES completion:NULL]; [activityViewController release]; } When i hit actionsheet button it shows blank activityviewcontroller with only cancel button. How can i now add Facebook, twitter, email and iMessage as share services in

UILineBreakMode Vs NSLineBreakMode

China☆狼群 提交于 2019-12-05 18:53:44
问题 I see some UIStringDrawing methods have been updated to use NSLineBreakMode instead of UILineBreakMode in iOS 6.0: E.g. - (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size lineBreakMode:(NSLineBreakMode)lineBreakMode How can I check for this to ensure my iOS 5 users and below continue to use UILineBreakMode? 回答1: No checking is necessary. These are just enums and they map to the same values You can see there is no real difference here: UILineBreakMode vs NSLineBreakMode enum

how do I update my old apps to iPhone 5? [duplicate]

…衆ロ難τιáo~ 提交于 2019-12-05 18:52:41
This question already has answers here : Closed 7 years ago . Possible Duplicate: How to develop or migrate apps for iPhone 5 screen resolution? My apps use standard Apple controls. Some of them are really simple (UITableView nested in a UIView) and others are UITextView inside a UIScrollView inside a UIView When I run the apps on my new iPhone 5, they are letterboxed. How do i update them to take advantage of the new iPhone 5 real estate? First of all to remove the letter boxing, you let xcode know it should work on the iPhone 5 by adding an iPhone5 sized startup image which will be named

CADisplayLink at iOS 6.0 not retaining target

落爺英雄遲暮 提交于 2019-12-05 18:36:12
I have a such code: NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:[self methodSignatureForSelector:@selector(updateFrame)]]; [invocation setTarget:self]; [invocation setSelector:@selector(updateFrame)]; displayLink_ = [[CADisplayLink displayLinkWithTarget:invocation selector:@selector(invoke)] retain]; [displayLink_ setFrameInterval:1]; [displayLink_ addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; At iOS 6.0 (in 5.1 this code works ok) when this code calling I have two variants: EXC_BAD_ACCESS or 'call to unrecognized selector "invoke"'. It is