A "simple" panel (view) swap back and forth

Running on Mac, trying to learn XOJO. With all the documentation and examples I can’t figure out how to do this and it seems it should be rather basic:

1: Start view (View1) has one button. When pressed a new view (View2) slides to cover the start view, View1.
2: A button on View2 will slide View2 off View1
3: Both views should be of the type where the color can be changed and controls added

Any gurus have suggestions?
If this solution is in the documentation PLEASE point out where!

Thanks in advance!
David

I’m sure there is an example for this.

Show view2:

Var v as new view2
view2.show(self)

When view2 is displayed it will have a back button at the top left to close the view.

To change the color of most things, you will need my IOSDESIGNEXTENSIONS kit

1 Like

I have downloaded this earlier but my level of XOJO experience prevents me from understanding all your code. I do like the “Show Settings” code where a view is animated over the main view but again, I fail to extract the simplicity of it and end up with the “simple” two panel objective I’m looking for.

I downloaded your extensions and viewed your video - the video 9 years old. Am I to believe XOJO has not improved in the past 9 years that it requires these extensions? Really? I had such high hopes.

My iOS videos are max 6 years old.
When it comes to design and UI, Xojo didn’t improve much but some key features are now available.

Have a look at https://Packr.app to see what is possible to do with xojo and iosdesignextensions

Don’t feel limited by the out of the box features of Xojo, it is still very powerful. I’ve had several million downloads of iOS xojo made apps. :wink:

Thanks for your feedback Jeremie. It’s obvious you invested lots of time on your code and documentation. I’ll take another look and seriously try out your extensions. Thanks again!

Tried to drag/drop iOSDesignExtensions into my project and all I get are errors for each control in the extentions:

“/Users/lessms/DEV/DOJO/Extensions/iOSDesignExtensions/iOSDesignExtensions/TabBarExtensionsXC.xojo_code can not be imported as external as it contains other classes or modules. It will be added to the project.”

If I leave the code and run my simple project I get loads of errors:

“LayerExtensionsXC.SetBorderColorXC, line 8
Type mismatch error. Expected class UIKit.UIColor, but got class UIColor
uic = New UIColor(value)”

AND

“SegmentedControlExtensionsXC.SetSelectedColorXC, line 4
Parameter “image” expects type Ptr, but this is type Int32.
setBackgroundImage_(seg.Handle, imageWithColor(New UIColor(c)), UIControlState.Selected, 0)”

Obviously I’m doing something wrong but what?

Use copy & paste from the example project

If you only use API2 controls, copy paste the following item into your project:

Screenshot 2023-07-25 at 09.39.31

If you have have both API1 and API2 items, copy paste both folders into your project:

Screenshot 2023-07-25 at 09.41.41

"A Xojo license is required to use the XML or Text project formats. "

Looks like I can’t paste these files unless I get a license.

You can. You just need a license to save in those formats.

Without a license I can only try to paste the folders/files withing the XOJO app on my MacOS. No matter where I place the cursor/pointer to paste the menu does not show a “Paste” option. If others have pasted these folders without a license then I must be doing something wrong but can’t figure it out.

I even tried to create a new iOS project, no changes of any kind, and past the folders (one or both) and the same results.

Do you mean that you don’t see this?
image

or are you trying to ‘right click’ to open a contextual menu and see Paste as one of the options?

Have you tried dragging from one Xojo project to the other?

1 Like

Dragging from the iOSDesignExtensions project to mine WORKED! No warnings or errors. Thank you very much AlbertoD!

1 Like