• Thanks everyone,
    @JonB You cleared my doubt on @ui.in_background, Now I'm using threading instead of ui.in_background

    import ui,threading as thr class view(): def __init__(self): self.flag = True content = ui.TableViewCell() play = ui.Button(frame = (259,0,50,content.height)) pause = ui.Button(frame = play.frame) play.image = ui.Image('iob:ios7_play_256') pause.image = ui.Image('iob:pause_256') pause.hidden = True play.action = self.Play pause.action = self.Pause label = ui.Label(frame =(0,0,0,content.height)) label.touch_enabled = False label.background_color = 'blue' self.play = play self.pause = pause self.label = label self.flag = False content.content_view.add_subview(play) content.content_view.add_subview(pause) content.content_view.add_subview(label) self.content = content def table(self): return self.content def Play(self,sender): t = thr.Thread(target=self.Playy,args=(sender,)) t.daemon = True t.start() def Pause(self,sender): t = thr.Thread(target=self.Pausee,args=(sender,)) t.daemon = True t.start() def Playy(self,sender): sender.hidden = True self.pause.hidden = False import time for a in range(320): self.label.width = a time.sleep(0.1) if self.flag: self.flag = False return def Pausee(self,sender): sender.hidden = True self.play.hidden = False self.flag = True class Llist(): def tableview_number_of_rows(self,t,s): return 40 def tableview_cell_for_row(self,t,s,r): return view().table() a=ui.TableView() a.data_source = Llist() a.allows_selection = False a.present()
  • @yas if you put some text in your b label, you can set your progress bar as transparent

    b.text = 'test' c.bg_color=(0,0,0.8,0.2)#'lightblue' c.bring_to_front()
  • @yas self is a delegate... It has no bgcolor!

    There is not an easy way to change the section header background color. There are some ways using objc_util, but you may want to crawl first before you walk... .

    The easiest approach is to keep track of headers on your own, and just create a cell instead of a section header.

  • @madivad All my last added fields types are processed in my_tableview_cell_for_row, thus they only work with the standard form_dialog.

    dialogs._FormDialogController.tableview_cell_for_row = my_tableview_cell_for_row diag = dialogs.form_dialog(title = 'Form Dialog', sections=form_list_of_sections)
  • Thanks ,I used Auto-Lock in settings to 30-Seconds and used


    Untill the timer runs out and changed the flag to False.

  • the other trick, if you plan in being able to run other scripts, is you need to bypass global clearing for your code.

    there are a few ways to do this. the best way is to have all of your code in a module that is in site-packages, import the module, then call some main() to show the ui. modules in site-packages don't get cleared when running other code. Other approaches are to ensure everything you need is in a single custom view class, with no use of globals (callbacks should use self, or sender). all methods should explictly import anything that is needed, since imports might dissappear from globals. when you present the custom view, the object won't be cleared until it is explictly closed.

  • Try dialogs.share_text(editor.get_text()), I think that does what you're looking for. (It shares the text as if you pressed "Share..." on a text selection, rather than sharing the file.)

  • @ccc I want to use kali linux tools like aircrack-ng and other hacking tools . Can you suggest some scripts . And do nmap work with pythonista?

Internal error.

Oops! Looks like something went wrong!