omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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?

    Pythonista
    6
    37
    25864
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JonB
      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)

      Phuket2 1 Reply Last reply Reply Quote 0
      • Phuket2
        Phuket2 @JonB last edited by

        @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

        1 Reply Last reply Reply Quote 0
        • Phuket2
          Phuket2 @TutorialDoctor last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • TutorialDoctor
            TutorialDoctor last edited by TutorialDoctor

            @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.

            1 Reply Last reply Reply Quote 1
            • TutorialDoctor
              TutorialDoctor last edited by

              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?

              1 Reply Last reply Reply Quote 0
              • TutorialDoctor
                TutorialDoctor last edited by TutorialDoctor

                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.

                1 Reply Last reply Reply Quote 0
                • RomSpy
                  RomSpy last edited by

                  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

                  1 Reply Last reply Reply Quote 1
                  • TutorialDoctor
                    TutorialDoctor last edited by

                    @RomSpy You may want to check out my navigation view tutorial here. I think that is what you are looking for?

                    1 Reply Last reply Reply Quote 0
                    • RomSpy
                      RomSpy last edited by

                      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.

                      1 Reply Last reply Reply Quote 0
                      • TutorialDoctor
                        TutorialDoctor last edited by

                        Ahh. Okay. I have done this before. You would simply:

                        1. Create the .pyui file for the menu
                        2. 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.

                        1 Reply Last reply Reply Quote 0
                        • RomSpy
                          RomSpy last edited by

                          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.

                          1 Reply Last reply Reply Quote 0
                          • TutorialDoctor
                            TutorialDoctor last edited by

                            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.

                            Phuket2 1 Reply Last reply Reply Quote 0
                            • RomSpy
                              RomSpy last edited by

                              Yes exactly! Thanks for the help!!

                              1 Reply Last reply Reply Quote 0
                              • Phuket2
                                Phuket2 @TutorialDoctor last edited by

                                @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

                                1 Reply Last reply Reply Quote 1
                                • TutorialDoctor
                                  TutorialDoctor last edited by TutorialDoctor

                                  @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.

                                  1 Reply Last reply Reply Quote 0
                                  • TutorialDoctor
                                    TutorialDoctor last edited by

                                    @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.

                                    1 Reply Last reply Reply Quote 0
                                    • RomSpy
                                      RomSpy last edited by

                                      @TutorialDoctor yes that is exactly what I was looking for thank you!!!

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post
                                      Powered by NodeBB Forums | Contributors