uikit

Custom AlertView With Background

半世苍凉 提交于 2019-12-18 05:12:55
问题 Everybody, I need to set one image on UIAlertView.. I have attached my UIAlertview with image prob.. i have used this code lines.. UIAlertView *theAlert = [[[UIAlertView alloc] initWithTitle:@"Atention" message: @"YOUR MESSAGE HERE", nil) delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease]; [theAlert show]; UILabel *theTitle = [theAlert valueForKey:@"_titleLabel"]; [theTitle setTextColor:[UIColor redColor]]; UILabel *theBody = [theAlert valueForKey:@"_bodyTextLabel"];

Disabling autorotate for a single UIView

别来无恙 提交于 2019-12-18 04:16:31
问题 Okay, this seems like it should be relatively simple, but I've been Googling for the better part of an hour, and can't seem to find what I need. I have a view controller that has a few different parts: a background view, a header view, and a few buttons. Now, I want the header and buttons to autorotate properly (they do, when I return YES from shouldAutorotateToInterfaceOrientation:), but under no circumstances should the background view rotate. Is there a proper way to do this? 回答1: If you

Navigation bar gets adjusted after calling completeTransition: in custom transition

。_饼干妹妹 提交于 2019-12-18 03:53:30
问题 My goal is to provide zooming modal transition from for the user from a view similar as springboard icons zoom in when launching apps. The presented view controller zooms in correctly, but the navigation bar has wrong position under the status bar. This position gets corrected after calling [transitionContext completeTransition:finished];. How can I make it correct from the beginning of the transition? This is a screen recording of the bug: http://youtu.be/7LKU4lzb-uw (the glitch is in the

Status bar tint color changes to black in iOS 6

坚强是说给别人听的谎言 提交于 2019-12-18 03:43:36
问题 I am apparently not understanding how to use the status bar tint in iOS 6. I have read this question: Change statusbar tint colour but implementing the solutions suggested there has not resolved the issue. I have configured the settings in the target summary pane (default for style and tinting) and added the status bar tint parameters dictionary to my info.plist as described in WWDC 2012 Advanced Appearance Customization. My status bar tints correctly at launch but once I navigate to another

presentViewController shows black page

耗尽温柔 提交于 2019-12-18 03:11:22
问题 - (IBAction)submitButtonClicked:(id)sender{ NSLog(@"here"); SuccessOrFailViewController *sfvc = [[SuccessOrFailViewController alloc] init]; [self presentViewController:sfvc animated:NO completion:NULL]; } I am trying to open a new page when a user clicks the submit button in the app. However, this opens completely black screen with nothing on it. How do I make it open the viewController instead ? 回答1: You are not entering the nib name for the user Interface: SuccessOrFailViewController *sfvc

presentViewController shows black page

一曲冷凌霜 提交于 2019-12-18 03:11:16
问题 - (IBAction)submitButtonClicked:(id)sender{ NSLog(@"here"); SuccessOrFailViewController *sfvc = [[SuccessOrFailViewController alloc] init]; [self presentViewController:sfvc animated:NO completion:NULL]; } I am trying to open a new page when a user clicks the submit button in the app. However, this opens completely black screen with nothing on it. How do I make it open the viewController instead ? 回答1: You are not entering the nib name for the user Interface: SuccessOrFailViewController *sfvc

Persistent UIBarButtonItem in UIToolbar?

霸气de小男生 提交于 2019-12-18 03:01:14
问题 I've been developing an iPhone app that uses a UIToolbar (in the context of a UINavigationController) to display a small status icon at the bottom of the screen. The toolbar will eventually also have action icons associated with it (think Mail application). I'm running into an issue where it appears that each UIViewController pushed onto the navigation controller's stack is expected to have its own set of items for the toolbar to display, and as a result, the "status" item fades out and back

UIKeyboardTypeNumberPad without a done button

假装没事ソ 提交于 2019-12-18 02:47:56
问题 How can we implement UIKeyboardTypeNumberPad so that it will have a 'done' button? By default it does not have one. 回答1: If I am not wrong then You want to ask as to how to add a custom "Done" button to keyboard for UIKeyboardTypeNumberPad . In that case this might be helpful. Declare a UIButton *doneButton in.h and add the following code to .m file - (void)addButtonToKeyboard { // create custom button if (doneButton == nil) { doneButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 163,

Any idea why this image masking code does not work?

时光怂恿深爱的人放手 提交于 2019-12-18 02:46:15
问题 I have this code to mask an image. Basically, I only work with PNG images. So I have a 300x400 PNG image with 24bits of color (PNG-24). I am not sure if it also has an alpha channel. But there's no transparency in it. Then, there is the image mask which is PNG-8bit without alpha channel. It is just black, grayscale and white. I create both images as UIImage. Both display correctly when putting them into an UIImageView. Then I create an UIImage out of them which contains the results of the

Weird behavior of UIView frame after rotation in iPhone

寵の児 提交于 2019-12-18 02:16:06
问题 Create a square UIView object testView_, and add this at viewDidLoad: - (void)viewDidLoad { [super viewDidLoad]; CGRect initialRect = testView_.frame; NSLog(@"before rotation: w %f h %f x %f y %f", initialRect.size.width, initialRect.size.height, initialRect.origin.x, initialRect.origin.y); testView_.transform = CGAffineTransformMakeRotation(0.1); NSLog(@"after rotation: w %f, h %f, x %f, y %f", testView_.frame.size.width, testView_.frame.size.height, testView_.frame.origin.x, testView_.frame