uikit

Presenting modal view occasionally hides the navigation bar

杀马特。学长 韩版系。学妹 提交于 2019-12-18 14:17:10
问题 I've come across this twice now. Sometimes using the following line of code: [self.navigationController presentModalViewController:aViewController animated:YES]; displays the view, but the navigation bar is then hidden. I can write: [self.navigationController setNavigationBarHidden:NO]; to my hearts content, everywhere I can think of with no effect. Has anyone ran into this? Am I doing something silly? 回答1: No, I ran into this as well. The problem is that when you present a modal view

iPhone - Making a Tab Bar Transparent

孤街浪徒 提交于 2019-12-18 13:37:57
问题 How do I make a tab bar transparent in cocoa touch? 回答1: Since UITabBar is a subclass of UIView , have you tried adjusting its alpha property? Note that if you are trying to modify a tab bar associated with a UITabBarController , you should consider this warning from Apple, located in the reference for UITabBar: Important: In iOS 3.0 and later, you should not attempt to use the methods and properties of this class to modify the tab bar when it is associated with a tab bar controller object.

iPhone - Jagged Edges when applying perspective to CALayer

大憨熊 提交于 2019-12-18 13:27:35
问题 I have a CALayer that I apply a perspective to using a CGTransform3D and specifying the m14 property. When the perspective is applied, the layer has jagged edges. I've heard people mention that adding a 1px transparent border around the layer will help with this. I don't know how to do that. I have tried using the border and borderWidth properties of a CALayer but the jagged edges are still there. I also tried to reduce the rect that is drawn by 1px on all sides, but it doesn't help either.

Why is there no autorelease pool when I do performSelectorInBackground:?

ぃ、小莉子 提交于 2019-12-18 12:47:12
问题 I am calling a method that goes in a background thread: [self performSelectorInBackground:@selector(loadViewControllerWithIndex:) withObject:[NSNumber numberWithInt:viewControllerIndex]]; then, I have this method implementation that gets called by the selector: - (void) loadViewControllerWithIndex:(NSNumber *)indexNumberObj { NSAutoreleasePool *arPool = [[NSAutoreleasePool alloc] init]; NSInteger vcIndex = [indexNumberObj intValue]; Class c; UIViewController *controller = [viewControllers

How do I create a standard iOS Share button?

感情迁移 提交于 2019-12-18 12:45:19
问题 The iOS Human Interface Guidelines say: Use the system-provided Share button. Users are familiar with the meaning and behavior of this button, so it’s a good idea to use it when possible. The main exception to this is if your app does not contain a toolbar or navigation bar[, as] the Share button can only be used in a toolbar or navigation bar. OK, but how do I “use the system-provided Share button”? A search of the documentation turns up nothing useful. I've gathered that I should use

Vertical Tab Bars? [closed]

a 夏天 提交于 2019-12-18 12:44:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I was wondering if anyone knows where I can find documentation or a tutorial on how to make a vertical tab bar for iOS like in 1Password or 2do. I figure that these aren't "real" tab bars, but I'd really like to use that functionality and I'm at a loss on how to accomplish it. Thanks in advance for any help! 回答1

How does unit testing on the iPhone work?

雨燕双飞 提交于 2019-12-18 12:29:35
问题 Do I need special libraries for this, or can I just create a huge class that trys to instantiate every object of my project and test all the methods in there? How's that done in theory? 回答1: If you're targeting iPhone OS 2.2 or later, you can use the version of OCUnit that's bundled with Xcode. There's a good blog article by Kailoa Kadano about this on Mobile Orchard. OCUnit is a unit testing framework that's similar to the well known JUnit framework from the Java world. You can always do

UIView “suck” animation

会有一股神秘感。 提交于 2019-12-18 12:28:06
问题 I'd like to use the UIView "sucking" transition (view is "sucked" into a point) referenced here: http://iphonedevwiki.net/index.php/UIViewAnimationState#Using_suckEffect The method above, however, uses private APIs, which makes it next to useless for an App Store app. How can I recreate a similar effect without relying on private APIs? I'm guessing the answer has to do with OpenGL, although I have zero experience there. 回答1: As long as Apple doesn't publicly document the effect, and you want

How to make NSDateFormatter display locale-specific date?

荒凉一梦 提交于 2019-12-18 12:20:54
问题 I am using NSDateFormatter to set my date in my iPhone app, and dates are showing up properly. However, I am finding all the locales (my app supports up to 12 different languages) are sticking to the date format I specify via setDateFormat. Ideally, I want the date format to appear in a form natural to the region setting for the user, instead of following my format (which works well for English but may not be natural for other locales). Following is my code: NSDateFormatter *dateFormatter = [

Compiling against 5.1 SDK forces new UIPopoverController “slide in” presentation of popovers — how to disable?

蓝咒 提交于 2019-12-18 12:15:51
问题 Compiling my iPad app against the 5.1 SDK (release version) causes UIPopoverController to show itself using the new "slide in" from the left presentation. This completely breaks my popover presentation, which relied on having a "black" style header and a certain height. I've tried setting presentsWithGesture to NO , but that only seems to disable the swipe gesture, and doesn't stop the presentation style. This same app, without being recompiled, but running on iOS 5.1, uses the old popover