I am presenting fullscreen content on an external display in a uiscrollview. I want to allow pinching and zooming on the iPad which will pinch and zoom the uiscrollview on the external display. How to translate the iPad gestures to the other window?
Thank you
You have to put the UIScrollView on both the iPad AND the external display. I believe that you should just set the iPad's Window root view controller to the same view controller that controls the external display. You could probably "hide" the view on the iPad if you really wanted to, and I could tell you how to do that if you really want to, but it is out of the scope of this question.
Related
What I'm looking to achieve is the exact same behavior as share view of iOS 13. I want to present my custom picker view as popover on iPad, and as semi modal on iPhone. I'm currently using "present as popover" on storyboard, which I get the default behavior that auto switches between popover and modal for free. I guess I need to switch to custom controller, but I'm lost on how to achieve this.
Since Xcode got updated, i can't use swipe gesture. I have 2 UIViewController, i dragged a Swipe Gesture in the first and in the second. I connected them with Modal Action Segue. I tried in the simulator and on my device and both didn't work. It's so simple and i used to be able to do it but now it just doesn't work. Am i missing something ? I tried playing with the "State: Enable button" but that didn't worked. Normally i would just do a navigation bar with a button to change view but for this app i really want to you swipe gesture... Thanks
That was a stupid mistake... I dragged the Swipe Gestures on the background images. You need do drag them on the view itself. Just move the background image and drag the swipe gesture on the UIView and it should work!
Lol, I'm having trouble with that too.
I fixed it by making swipe gesture programatically
I have a background image issue for my app after I updated the project for iOS 7.
The app is navigation controller managed. I have a background image (UIImageView) created in IB. Since I place it a bit under the navigation menu I assume that the placement is calculated from the top of the view which in iOS 7 is beneath the Navigation Controller. When I run the app in iOS 6 the image is quite far down on the screen. Once again I assume this is because the top of the view in iOS 6 is below the Navigation Controller menu.
How do I fix so that the image has the same vertical distance from the navigation controller in iOS7 and iOS6?
Best regards
Frederik
iOS 7 brings several changes to how you lay out and customize the appearance of your UI. The changes in view-controller layout, tint color, and font affect all the UIKit objects in your app. In addition, enhancements to gesture recognizer APIs give you finer grained control over gesture interactions.
Please refer answer here.
One solution what I did is : I hooked background image to a reference from my xib, and set the frame programmatically from ViewDidLoad. It works fine.Please note that not forget to check iPhone 5 and iPhone 4 and set height to 568 and 480 respectively.
My app has a NSView in a NSWindow which covers the screen and draws a semi-transparent shade on it, above that I've got another NSWindow which contains my app's UI, so the full screen view is designed to fade out background distraction of other windows.
How can I allow mouse clicks on the full screen view to go straight through to the underlying window, which will belong to another app, or even the desktop? Note that I don't want it to keep focus on my app.
Shady by Matt Gemmell does exactly the same, take a look at the source:
http://instinctivecode.com/shady/
It does this by sending the following message to the window:
[window setIgnoresMouseEvents:YES];
There are tutorials for using a webkit view inside a cocoa application to achieve skinnable contents, but what would I do if I wanted to use webkit to create custom, skinnable windows?
Examples would be dashboard widgets, or
BowTie
Beware, I'm a noob.
I've never tried it, but I think you'd just set a WebView as the content view of a transparent borderless window, and tell the WebView not to draw a background. That way, the content of the WebView would define the window boundary.
You create a borderless window by passing NSBorderlessWindowMask to the -initWithContentRect:styleMask:backing:defer: method of NSWindow, and you can set its background to transparent by calling [window setBackgroundColor:[NSColor clearColor]].
You'd have to handle dragging of the window etc yourself. It will probably get a bit messy.
To be honest, it's not something I'd attempt as a first Cocoa project.