ios7

Separator between navigation bar and view - iOS 7

Deadly 提交于 2019-12-19 12:52:22
问题 In iOS 7 there's a grey separator between the navigation bar and the view. Back in iOS 6, there wasn't that horizontal line, thus the view would blend in with the navigation bar as if they were the same image. Now I don't know how to remove it... I've tried resizing the view / navigation bar, but it doesn't help. Any ideas? 回答1: Try with self.navigationController.navigationBar.translucent = NO; In your viewDidLoad method and let me know :) If you need this effect on every ViewController, you

Draw Line Using UIPinchGeustureRecognizer

时光总嘲笑我的痴心妄想 提交于 2019-12-19 11:42:50
问题 I want to draw line using UIPinchGeustureRecognizer,I have tried all stackoverflow solution but no luck. please help me to resolve this. I am getting following error First i want to know my code logic is correct or not.and i didnt get the points from touchbegan/touchmoved. i am gettting two points from (void)handleLinePinch:(UIPinchGestureRecognizer *)gesture only. //My instances in .h file CGPoint location1,location2; LineView* l; - (void)viewDidLoad { [super viewDidLoad]; l = [[LineView

UILocalNotification every 30 seconds

╄→гoц情女王★ 提交于 2019-12-19 11:42:12
问题 I am trying to setup a UILocalNotification to run every 30 seconds using the following logic, however it seems to be misbehaving. There are 2 issues: When the notifications get fired there seems to be a lot of them all at once, rather than 1 every 30 seconds. The application icon badge number doesn't seem to increase. It just stays at 1. Please can someone help me work out what I've done wrong? // Create 'base' notification we can use UILocalNotification *baseNotification = [

How to add custom navigation bar to a full-screen VC in iOS 7 and make it tint the status bar to match?

旧巷老猫 提交于 2019-12-19 11:31:05
问题 In an app I'm developing (Xcode 5, >=iOS 7 auto-layout), I push a modal view controller. I want the modal view controller to have a navigation bar, so I add one, and add a constraint that positions it with it's top aligned with the top layout guide, so it is placed just under the status bar. (I'm using my own navigation bar because I want to take advantage of the system's management of the edit button and add button nav bar items. ) The standard navigation bar has a very subtle light gray

How to add custom navigation bar to a full-screen VC in iOS 7 and make it tint the status bar to match?

二次信任 提交于 2019-12-19 11:31:04
问题 In an app I'm developing (Xcode 5, >=iOS 7 auto-layout), I push a modal view controller. I want the modal view controller to have a navigation bar, so I add one, and add a constraint that positions it with it's top aligned with the top layout guide, so it is placed just under the status bar. (I'm using my own navigation bar because I want to take advantage of the system's management of the edit button and add button nav bar items. ) The standard navigation bar has a very subtle light gray

Hiding mapview when mapoverlay is visible ios7

烂漫一生 提交于 2019-12-19 11:27:03
问题 How do I hide the mapview when I have an overlay on top of the mapview in iOS7? This snippet of code used to work in iOS6 but when i upgrade my app to iOS7 it cease to work. NSArray *views = [[[self.mapView subviews] objectAtIndex:0] subviews]; [[views objectAtIndex:0] setHidden:YES]; Any suggestions or feedback? 回答1: With what incanus said with MKTileOverlay , it is like this in the view controller: - (void)viewDidLoad { [super viewDidLoad]; NSString *tileTemplate = @"http://tile.stamen.com

UIScrollView scrolling only with one finger

牧云@^-^@ 提交于 2019-12-19 11:14:35
问题 iOS7 & iOS8 I need to disable 2 or three fingers scrolling in UIScrollview . I tried : [self.scrollView.panGestureRecognizer setMaximumNumberOfTouches:1]; [self.scrollView.panGestureRecognizer setMinimumNumberOfTouches:1]; But it has no effect. It is still possible to scroll with 2 fingers. If i tried to set max and min to 2. One finger scrolling was disabled but 3 fingers scrolling possible :( I tried this too, but without success: for (UIGestureRecognizer* pan in self.scrollView

UIScrollView scrolling only with one finger

99封情书 提交于 2019-12-19 11:13:50
问题 iOS7 & iOS8 I need to disable 2 or three fingers scrolling in UIScrollview . I tried : [self.scrollView.panGestureRecognizer setMaximumNumberOfTouches:1]; [self.scrollView.panGestureRecognizer setMinimumNumberOfTouches:1]; But it has no effect. It is still possible to scroll with 2 fingers. If i tried to set max and min to 2. One finger scrolling was disabled but 3 fingers scrolling possible :( I tried this too, but without success: for (UIGestureRecognizer* pan in self.scrollView

Change tabbarController's tab programmatically with animation

我与影子孤独终老i 提交于 2019-12-19 09:27:25
问题 I want to change tab through code with animation. Exact scenario is that there are 2 tabs with below hierarchy. First tab - Navigation controller - Login controller - Some other controller Second tab - Navigation controller - Screen with Logout button Now, if user presses logout, I need to display login screen. For that I need to switch tab to FirstTab and then popToRootViewController. So what I am doing is on logout button press I send NSNotification to LoginController which in turn executes

Does SpriteKit apply physics if I modify the position and rotation of a SKSpriteNode directly without an SKAction?

痴心易碎 提交于 2019-12-19 09:23:27
问题 For example if I want to do my own custom animation and move an SKSpriteNode every frame programmatically by x += 10 , will Sprite Kit still apply physics correctly or must I always use SKAction? 回答1: Manually moving a node with a physics body is possible regardless of how or when you do it. But in any case it's not recommended since it can adversely affect the physics simulation. The node (view) could be out of sync with the position of the body for 1 frame, and you might move the body into