• samaklis

    @cvp Thanks for the info! The issue was fixed based on editing the binary as per post. I hope that @omz will update the framework so we don’t have to do this going forward.

    posted in Pythonista read more
  • samaklis

    Hi, does anyone know how to remove the UIWebView from the Py3Kit frame work and rebuild the framework in xCode? Looks like apple no longer accepts application submissions with UIWebView references, and they will not allow an application uploaded. The framework has the module already compiled in it.

    As per their message:

    ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

    Thanks

    posted in Pythonista read more
  • samaklis

    Same issue here... I am under the impression that Pythonista may be an abandoned project...

    posted in Pythonista read more
  • samaklis

    Actually changing the corner_radius of the segment control somewhat does the trick.

    The below example does what I originally intended. It’s amazing what a cup of coffee and the next day does to the brain! :-)

    import ui
    v =ui.View()
    v.background_color = 'black'
    v.frame = (0,0,400,200)
    s = ui.SegmentedControl()
    s.segments = ['aaa','bbb']
    s.background_color = 'white'
    s.corner_radius = 5
    s.frame = (10,50,380,100)
    v.add_subview(s)
    v.present('sheet') ```

    posted in Pythonista read more
  • samaklis

    Thanks for the replies. What I was trying to achieve is to blend the background so the segmented control does not look squared. So in your example with the yellow color background those yellow cornered should be black and the segment looks rounded which is what is somehow done when you use the default white background on a view as per code below.

    I was under the impression that there was some way by altering the corner radius and that there was a post originally on the forums but unfortunately I could not find it.

    import ui
    v =ui.View()
    v.background_color = 'white'
    v.frame = (0,0,400,200)
    s = ui.SegmentedControl()
    s.segments = ['aaa','bbb']
    s.frame = (10,50,380,100)
    v.add_subview(s)
    v.present('sheet') ```

    posted in Pythonista read more
  • samaklis

    I have a segmented control that when the view it is a member of has say a black background color and I sent the background color of the segment control to be white, you can see the square ends of the border which are also filled with the background (white) color, so the whole control is squared rather than “rounded”

    Is there a way to also set the space between the rounded edges then the rectangle to be the same as the background color of the view? (not sure how to put in a picture, but I hope it is easy enough to visualize)

    Thanks

    posted in Pythonista read more
  • samaklis

    Extending it worked perfectly. Thanks

    posted in Pythonista read more
  • samaklis

    A table view has the following two delegate methods defined

    
        def tableview_did_select(self, tableview, section, row):
            # Called when a row was selected.
         
            # this is implemented in ListDataSource
            pass
    
        def tableview_did_deselect(self, tableview, section, row):
            # Called when a row was de-selected (in multiple selection mode).
    
            # this is NOT implemented in ListDataSource...
            pass
    
    

    It looks as though the ListDataSource object only implements the first one, so I am not able to determine when multiple selection is enabled in edit mode, after the user may select and deselect any rows, what rows remain selected.

    Has anyone come across this issue before?

    
    class ListDataSource(builtins.object)
     |  Methods defined here:
     |  
     |  __init__(self, items=None)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |  
     |  reload(self)
     |  
     |  tableview_accessory_button_tapped(self, tv, section, row)
     |  
     |  tableview_can_delete(self, tv, section, row)
     |  
     |  tableview_can_move(self, tv, section, row)
     |  
     |  tableview_cell_for_row(self, tv, section, row)
     |  
     |  tableview_delete(self, tv, section, row)
     |  
     |  tableview_did_select(self, tv, section, row)
     |  
     |  tableview_move_row(self, tv, from_section, from_row, to_section, to_row)
     |  
     |  tableview_number_of_rows(self, tv, section)
     |  
     |  tableview_number_of_sections(self, tv)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  items
    
    

    posted in Pythonista read more
  • samaklis

    I realized that there is already a function that works correctly when it comes to detection the light/dark mode at any screen, built into the ui module...

    In case anyone has the same problem the below does the trick:

    ui.get_ui_style() 
    

    posted in Pythonista read more
  • samaklis

    This is an old thread but the functionality of how to make fields as children nodes of a scroll view is documented here: http://omz-software.com/editorial/docs/ios_workflows/special/action-custom-ui.html

    Scroll View – A scrollable canvas, to add content to it, tap it and select “Subviews…” from the context menu.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!