Skip to content

Commit

Permalink
Update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdGrub1384 committed Nov 25, 2018
1 parent 1b8c6c6 commit 913c8dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions Pyto/Samples/Tint Color.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
Changes the tint color of the app to red.
"""

from rubicon.objc import *
from UIKit import UIColor, UIApplication
import mainthread

# Code here

UIColor = ObjCClass("UIColor")
UIApplication = ObjCClass("UIApplication")

def changeTintColor() -> None:
UIApplication.sharedApplication.keyWindow.tintColor = UIColor.redColor

Expand Down
2 changes: 1 addition & 1 deletion Pyto/Samples/User Interface/Interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def viewDidLoad(self):
# Check if the `ExampleViewController` class is already defined. When an Objective-C class is defined, you cannot redefine it before re-launching the app.
# So, always use unique class names for your scripts.
# You should also define external functions and call them from the class so you can modify them. You cannot modifiy a class until re-launching the app.
ExampleViewController
ExampleViewController = ObjCClass("Pyto.ExampleViewController")
except:
class ExampleViewController(UIViewController):

Expand Down

0 comments on commit 913c8dc

Please sign in to comment.