def create(self): self._impl = TogaSlider.alloc().init() self._impl._interface = self self._impl.setTarget_(self._impl) self._impl.setAction_(get_selector('onSlide:')) self._add_constraints()
def startup(self): self._impl = ButtonImpl.alloc().init() self._impl.__dict__['interface'] = self self._impl.setBezelStyle_(NSRoundedBezelStyle) self._impl.setButtonType_(NSMomentaryPushInButton) self._impl.setTitle_(at(self.label)) self._impl.setTarget_(self._impl) self._impl.setAction_(get_selector('onPress:')) self._impl.setTranslatesAutoresizingMaskIntoConstraints_(False)
def create(self): self._impl = TogaSlider.alloc().init() self._impl._interface = self self._impl.continuous = True self._impl.addTarget_action_forControlEvents_( self._impl, get_selector('onSlide:'), UIControlEventValueChanged) # Add the layout constraints self._add_constraints()
def create(self): self._impl = TogaButton.alloc().init() self._impl._interface = self self._impl.setBezelStyle_(NSRoundedBezelStyle) self._impl.setButtonType_(NSMomentaryPushInButton) self._impl.setTarget_(self._impl) self._impl.setAction_(get_selector('onPress:')) # Add the layout constraints self._add_constraints()
def create(self): self._impl = TogaStepper.alloc().init() self._impl._interface = self self._impl.minValue = self._config["min_value"] self._impl.maxValue = self._config["max_value"] self._impl.increment = self._config["step"] self._impl.setTarget_(self._impl) self._impl.setAction_(get_selector('onChange:')) self._add_constraints()