Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Any User Interface requests?
-
-
I looked at that tutorial however the base menu is built using "ButtonItems" I was referring to one where the base menu was its own .pyui file. The answer is probably somewhere in there maybe I am just not fully understanding it.
-
Ahh. Okay. I have done this before. You would simply:
- Create the .pyui file for the menu
- Add the that menu as a subview of the main screen like so:
main_view = ui.load_view("viewName") menu_view = ui.load_view("menuViewName") # If the view you want to load is in another directory named 'Views' you could do: menu_view = ui.load_view("Views/menuViewName") main_view.add_subview(menu_View) main_view.present()
If you want me to make a sample of this, just upload a screenshot or drawing of how you want to look and I will make a demo version.
-
I used the example you referred to above to create a program that switches between the views using the ButtonItems the file I am trying to use for a menu instead looks like this http://www.jandlwebservices.com/screen.jpg
I can upload the .pyui file if that is easier.
-
Okay. Cool. And you want these buttons to link to different .pyui files using a navigation view like in the tutorial correct?
I won't be near wifi much longer, but I will work on two different solutions and you can tell me which is more suitable.
-
Yes exactly! Thanks for the help!!
-
@TutorialDoctor , hey. Sorry for the lack of feedback. Lots of visitors at the moment. But I think we are talking about different things regards interfaces. Which is fine. I think you are focusing on a functional bare bones demo/tutorial of how to create ui's
My idea on the other hand is to create functional libs with hooks etc, so they they can be reused rather than from instructional perspective. It makes sense from your username 😎I think both are valuable.
here is a gist example I was working on, look it's crappy, I am just not getting enough time to do anything in it at the moment. But it gives you an idea of what I mean. The intent is that it would give a iOS reminders style interface. Ultimately trying to hide the user interface detail and giving methods/properties for the appropriate data elements. As I say, this gist is just a start. I struggle structuring objects for reusabiliy. Doing things like this help me though. Even here, I am focusing on reminders. If I was good enough, I would write another layer above to facilitate doing all the standard iOS apps. More code reuse and style uniformity. Anyway, just to let you know my idea
-
@Phuket2. Great start! Yes, the splitViewController I made was rather longwinded for clarity to those who have no idea how a splitViewController would be constructed. My aim for that project was to make it editable with hopes someone more savvy would take that and make a class from it for their needs.
I also agree that it should be more of a library or a wrapper around existing modules.
-
@RomSpy Hopefully this is what you are requesting.
A menu with buttons pops up and you can push views into any view of your choice (in this case it is a view named main) by pressing the button.
The way I made it is that the name of the view has to be the same name as the title of the button. The function to do this was sorta simple.
def connect(sender): try: main.navigation_view.push_view(ui.load_view('Views/'+sender.title)) except: None
Then you just make this the action for all buttons in the main view:
for item in main.subviews: item.action = connect
My views are stored in a folder called Views.
-
@TutorialDoctor yes that is exactly what I was looking for thank you!!!