Prevent the Master View to be shown when dragging UIimageView close to it in a iPad SplitView Application - objective-c

My IPAD application is a kind of a game in which the user has to set the images in the right order.
For example, there are four fairy tale images that have to be rearranged in the right order basing on what comes first and last in the story.
If i drag the image close to the Master View when i'm running in landscape or portrait mode the event which opens the master view is firing and hiding my image behind the Mater View.
I searched all around and I did not find anything which stops this master view to be shown when i drag a finger from left to right.
The detail view always have to be shown because the user can't lose focus, so always show the Master View is not a solution.
Is there a way to disable/prevent the master view to open when touching the screen from left to right like I described?
I tried to post a screenshot here but I have no reputation to do that, sorry.

As CodaFi answered up there, I must set the presentsWithGesture attribute when creating my splitview like below:
if ([splitViewController respondsToSelector:#selector(setPresentsWithGesture:)])
[splitViewController setPresentsWithGesture:NO];
It prevent the swipe gesture to open the master view.

Related

uibutton dosnt respond to touch when at a location

Bit of a strange one.
I have a UIButton which works when located anywhere on the view except the top left hand corner when in landscape mode.
I have a navigation bar with a back button nested in the same area but when the the video enters full screen and playback state changes this navigation bar is hidden.
any ideas?
As thought, the problem was occuring due to the hidden navigation bar and the navigation item located in the same place.
The only solution i can find was to remove the navigation bar from superview then add it back when needed.
Your view's hierarchy is not properly configured. To properly configure your hierarchy, you need to navigate to either the xib or storyboard that you're working with, and re-order the button so that it's on top of anything that falls within it's similar bounds. A common example is that you added a UIView, which is clear, and you had the button underneath it, and now you can't interact with it even though you can't see it.

Can't seem to achieve the same effect on my slide menu as Any.Do

I am trying to create the same type of slide-up/pull-up menu (from the bottom) as the Any.do iPhone app, but not having any success.
The issue I am running into is the app was built with storyboards so I am thinking I might have to scratch that idea and use just code.
Any ideas?
There is no need to get rid of your storyboard to recreate this, that's what IBOutlets are for. Any way, it looks like this was made by creating a UIScrollView that takes up the entire screen. Then add a UITableView to the upper section of the scroll view. Mind you in order for this to work, you'll need to disable scrolling on the scroll view in the background.
From there you can programmatically add the other elements to the scroll view to be rendered off screen, since there are only three they can probably just be buttons. And finally, since scrolling is disabled on the background scroll view you can add an image with a UISwipeGestureRecognizer at the bottom of the screen to manually change the scroll view's content offset property.

XCode: Best Way To Handle A New View In A Tabbed Application

In an iOS Tabbed Application I'm making, I've got tabs to load different viewControllers, which is pretty standard. What I'd like to do is make a few buttons (with images on them) load up another view with the button image maximized to the screen. However, I'm not really sure how to go about doing this. I don't want a new tab for this, I just want another view to show the full image, and then a button to return to the tabbed view. I've experimented a bit with making a subview to do this, and I've attempted to change the main viewport to the new view, with no success. If someone could point me in the right direction, and maybe give me a solid concept as a jumping-off point, I would really appreciate it.
And to clarify, I'm not looking for "the best way", per se. I'd be willing to accept a quick and dirty fix. But if you know of more than one way to handle this situation, I would appreciate whichever one you personally think is better.
I would do it by creating a UINavigationController to use as the primary tab view. When you want to show the full screen button, you create a new UIViewController subclass (below) and push it. That class will return YES for the method "hidesBottomBar" (its something like that).
This new view controller will be a traditional controller. You can create a UIImageView to fill the view (or you can probably replace the view with the imageView). In the viewDidLoad you'll set the UIImage of the view (or you can enter its name in the nib).
When someone clicks on the button, then you'll pop that view and return to your tabbed view (where the tab bar is showing).
I did something like this (not a big button), so I know the tab bar can be made to hide on the push. You can also hide the navigation bar so it never is even show (again, not 100% sure at the moment how to do it but its possible).

How do you create a slide out tableView on the right instead of the left of iPad Master-Detail Application?

If you create an iPad Master-Detail Application and use Portrait orientation, it gives you a slide out tableView on the left.
1. How do you make it to show on the right?
Also, in the landscape orientation, it is split in into two views.
How do you make it so that it will be the same as the Portrait View, like slide the TableView out?
Is it possible to adjust the size of the Detail View?
If you dont want two views in landscape, why do you need a splitView at all? You can just have a UIView with a popover button on the top bar. Then you can add the tableviewcontroller to the popover. To show it to the right you can define the rect or use the rightbarbuttonitem to add the popover.
You can have master on right by passing masterviewcontroller as second parameter to the array assigned to splitViewController.viewcontroller. However, you cannot resize the master and detail views. Hence you will end up having a bigger masterView than the detailview.
Looking at limited functionality of UISplitViewController, it may not be possible to have master on right(properly working as per your requirements). You can have your own controller to get this done or try using opensource options like MGSplitViewController.
you may also like to look into this discussion

UITableView became unclickable somehow

I had a working UITableView whose cells are populated with a title, subtitle, and image that was working great and could be clicked on to print something to the console.
In changing other aspects of the app, I or my partner must have somehow messed something up because the table view will still come up when the correct button is touched and gets populated with image and titles as before, but it has become completely unresponsive.
The tiles won't turn blue when clicked, nothing is printed, and the table view won't even scroll when dragged so it's like the is completely unresponsive to all touch events.
I've tried and tried to find out what happened but no luck... Are there any common mistakes or connections I could be missing that would cause this?
Go to IB and check if User Interaction enabled is checked. It must be enabled. If you're creating the TV from code, set the userInteractionEnabled property to YES