Any User Interface requests?
JonB last edited by
Ok, figured it out. I kept with the scrollview approach, but added a method which allows scrollviews/tableviews, etc to scroll inside the main scrollview. There was an objc method which allowed this. This lets tables use the delete row swipe.
(edit: Arg... so this works in sheet, but not in panel. back to the drawing board)
@JonB , I just tried the latest version. I am not sure we are seeing the same things or not. But on my ipad pro, I get like a slide, then like a snap to then a bounce type effect. Just running your example without any modifications whatsoever. What I see, I don't think a user would enjoy that interface. It's almost like you have to flick the screen rather than swipe it
@TutorialDoctor , did you pick a project to work on? Another idea I have had in the past is to make ui's based on iOS apps. I still think it should be done. Like, contacts, reminders, notes , system prefs etc... I am guessing generally these are the core interfaces. Hence my excitement for a slideview.
@Phuket2 That is exactly what I have been thinking. If I can mimic the functionality of core IOS apps, then I should be able to do just about anything. The Text Editor UI I posted in the other thread was made to simulate the sort of split view concept. I had no former knowledge of the splitViewController at the time, but I am seeing it is pretty similar in structure to the way I tried to do the Text editor.
I am trying to see what is the real difference between that UI I made an a real splitViewController.
I think I am going to go ahead and take a crack at a splitViewController using only Python.
I am finished with the splitViewController. I can't connect my iPad to the internet right now. I will upload it later.
Any more requests?
Here is my splitViewController
It is based on my exploration of model view controllers
By definition I think I have finally understood what a View Controller is. A splitViewController isn't so complicated. It is just a view controller that controls two different view controllers, each of which have their own views.
A splitView controller doesn't necessarily have to bey laid out like we see in the Reminders or Mail app. It can even be split 3 ways or four ways.
Maybe it exists and I can't find it but I would like to see an example of a nav view that uses a .pyui file with buttons as the menu and changes between other .pyui files
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.
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!!!