if you look at these screenshot, are iOSTables with round corners in Xojo possible? Does anyone have a declare?
And, is it possible to show/hide a split view in landscape mode? This is possible in iAWriter or Ulysses (fifth button from the right side) via Toolbutton Click.
Yes both are possible.
I’ll check the declares I have when I get back to my Mac
Actually rounded corners on grouped cells like the Settings app is very complicated. I do not have a Xojo solution for this.
I only have a solution for setting the entire table rounded corners.
[code]Declare Function layer_ Lib UIKitLib selector “layer” (id As ptr) As Ptr
Dim layer As ptr = layer_(table.Handle)
Declare Sub setCornerRadius Lib QuartzCoreLib selector “setCornerRadius:” (id As ptr, value As CGFloat)
setCornerRadius layer, 8
Declare Sub clipsToBounds Lib UIKitLib selector “setClipsToBounds:” (id As ptr, value As Boolean)
To hide the left panel in a split view add this enumeration in a module
Protected Enum UISplitViewControllerDisplayMode
And then this function
[code]Public Sub SetDisplayMode(Extends scr As iOSSplitView, mode As UISplitViewControllerDisplayMode)
//Changes the SplitView in portrait mode
Declare Sub setPreferredDisplayMode Lib “UIKit” _
selector “setPreferredDisplayMode:” (obj As Ptr, mode As UISplitViewControllerDisplayMode)
Or you could just use iOSDesignExtensions https://github.com/jkleroy/iOSDesignExtensions
Thanks for your input Jeremy. I already use your pretty cool iOSDesignExtensions. Could you please create a small sample project with both declares? Using SetDisplayMode within a View crashes the App:
I copy pasted your code into a new project, imported iOSDesignExtensions and I don’t experience any crash.
A somewhat similar question so posting here rather than starting a new thread.
I have an iPad app that uses split mode in landscape only. when the user taps a button, I want the app to show a photo in the Details view display full screen AND allow the user to draw on the photo with finger or stylus.
Setting the display mode to PrimaryHidden almost works except that when the user starts drawing on the photo, the system interprets it as a swipe and displays the Primary/Master panel temporarily. From reading the Apple documentation, it seems what I want to do is set the isCollapsed property to True rather than setting the display mode to PrimaryHidden.
Is that what I want to do and if so what declares are necessary to do that (and then set isCollapsed to False again after the user finished editing and taps a close button). Alternative strategies welcome!
(Pre-iOS 13, I did this using a modal view which worked wonderfully, but of course does not work now because drawing in the model view is also interpreted as a swipe)
[code]Declare Sub collapsed Lib “UIKit” selector “collapsed:” (obj As Ptr, value As Boolean)
Thanks, Jeremie. Unfortunately, both versions crash the simulator and replacing “collapsed” with “isCollapsed” suffers the same fate. I also tried “Self.ParentSplitView.ViewControllerHandle” in place of “App.CurrentScreen.content.ViewControllerHandle” with the same result.
I appreciate you taking the time to give it some thought.
When you need to hide the master view call this:
Declare Sub presentsWithGesture Lib "UIKit" selector "setPresentsWithGesture:" (obj As Ptr, value As Boolean)
And set the display to PrimaryHidden
[quote=476742:@Jeremie Leroy]When you need to hide the master view call this:
Declare Sub presentsWithGesture Lib “UIKit” selector “setPresentsWithGesture:” (obj As Ptr, value As Boolean)
And set the display to PrimaryHidden[/quote]
Perfect! Thanks so much!