adding swipe gesture to view controllers on storyboard not working - iphone

I am pretty new to this so i was following this tutorial.
www.youtube.com/watch?v=5u1-DGiUhXU
I have 4 view controllers with images etc. And i have done exactly as per this video. My problem is, if i tap, drag do anything nothing happens. I am just stuck at main screen. I have tried changing push to model but it don't work either.
Any Ideas?

You should set your imageViews UserInteractionEnabled = YES to enable touches cause it is =NO by default. Just solved similar problem this way.
EDIT: I've just repeated the actions described in video and everything works fine! You really should follow the video guide carefuly!
P.S. The swipe gesture should be a quick move from the left side of screen to the right.

I saw the same tutorial and I had the same problem and i solved it as follows:
When dragging the Swipe Gesture Recognizer u MUST drag it into the view itself(where the background color apears).
When it wasnt working for me i was dragging it to the Black bar on the bottom.
Hope this helps.

Related

iPhone Google Chrome - Tab selection screen (Grouped UIViews)

I am working on an app for iOS and I have to do a tab selection screen like the Google Chrome app for iPhone (I attached a screenshot). I searched a lot but I didn't found any similar control to use. As i can see, it groups some UIViews and use a UIScrollView to scroll, but maybe any of you could explain me better how this control works or have any solution.
Thank you!
http://i.stack.imgur.com/rCG5g.png
Create Different UIViews with your controls.(One tab is equal to is on UIView)
Add this UIView's on UIScroll View.(This is optional. It's ok if you don't use the UIScrollView and add UIView on self.view
Implement the touch method on UIView.
When you get a particular UIView is touched change it's center position to Center of the screen.
Which will give you the UIView which is touched in foreground and rest of the Views in background.
Hope this will help you .........
I solved my problem with this ......
https://github.com/xxhp/BrowserTabViewDemo

Animating an UIButton on an UIScrollView

I'm having problems animating my button in my scrollview. Basically what I'm doing is moving the button down the y-axis when the button is pressed down and moving it back to it's original position once the press has stopped. My code itself works just fine and does exactly what it is meant to do. Oddly enough, it only does so on a regular View. On a scrollView, it only moves it down after a short delay after it is pressed and the animation is very choppy. I know that there's nothing wrong with my code and that's why I'm so confused. Does anybody have an idea on how to fix this? Any help would be greatly appreciated!
Not sure how to make what you want work, but I am pretty sure the "choppy" behaviour is a result of the UIScrollView touch being recognized and activating what it is meant to activate (i.e pan gesture). One idea that comes to mind is to disable scrolling when this action is performed.

How can I do this iPhone (segmentedcontrol?) layout?

Please look at this screenshot:
When you tap in another segmentedcontrol, it switches smoothly (try it if you can).
First of all, is it a segmentedcontrol?
Second, how can I add this smooth effect?
Thanks guys.
I just tried. It does not seem to be a segment view.
Maybe 3 dark buttons(or view or views) and a layer that moves and overlay the current selected button.
Everything is well crafted so it looks great ;)
I think I could do that with a big UIImageView (instead of the three buttons) with an UITapGestureRecognizer to get the touch and a CALayer for the selected button

Views and buttons unresponsive to touches after rotation

I am coding against iOS 3.0 and I am trying to add rotation (landscape) support to my app.
Everything about the rotation was easy enough. However, after rotation to landscape mode from portrait, the right-third of the screen (480-320) is unresponsive to all events (touches, drag, etc.). I've verified that the key window is receiving the events but those events are not being passed to the buttons and UIViews on the right (in landscape) side of the screen.
I am using NSNotificationCenter to receive orientation changed events (and not using autorotate flag).
I did see: link text but that wasn't very helpful to my case.
Stuck. Need help. Thanks.
I've fixed the problem I was having .. I basically needed to do [self.navigationController.view setNeedsLayout].
The way I understand this (which maybe incorrect is that self.navigationController.view.frame was same as self.view.frame and both were equal to (x=0,y=0,width=320,height=480). I then rotated self.view by M_PI/2 and did a number of frame manipulation on select self.view.subviews to get everything to animate/position/scale correctly.
That worked out okay but the navigation controller was not willing to acknowledge touch events to parts of self.view there were to the right of 320. In essence, if this self.navigationController.view.clipsToBounds were true, it might not even have shown that part of self.view.
Anyway, setting setNeedsLayout on the navigation controller's view resolved the issue. I hope this helps someone else.

How to show status bar on top of custom camera overlay?

I have this critical issue with showing top statusbar on the custom camera overlay which seems impossible for me at the moment. I posted the same question to Apple dev forum but did not get any response for some time now.
In my application, I have a custom overlay view set as the overlay to the UIImagePickerController. At the bottom of the custom overlay view (this is a UIViewController), I have put a toolbar that enables user to click on toolbar items. Since the top statusbar is not shown when the camera opens up, the whole screen get pushed upwards and makes a narrow white color gap between the bottom of the screen and the bottom tool bar.
I am not aware of how to resolve this issue, but I think if we can show the top status bar on the top of the camera then this will be automatically get resolved. Thanks for any answers.
Had a similar problem a while back and all I did was resize my view. Why not try that and see if it works.
If that doesn't work then showing the status bar should be
[[UIApplication sharedApplication] setStatusBarHidden:NO];
Thanks for the tip domino, I found how it should be done from this thread and resize the main uiview to 320x480 instead of default 320x460. Hope this will help someone else. Thanks.
Can't resize UIView in IB