Programmatically creating UIStepper and UISegmentedControl Using Swift

UIStepper UIStepper is the iOS UI component that provide the easiest way to implement the consecutive numeric value change. UIStepper has +/- signs for increment/decrement function. In this tutorial we will print the value in console depending on user ‘s interaction with UIStepper.   123456var customStepper = UIStepper (frame:CGRectMake(110, 250, 0, 0)) customStepper.wraps = true customStepper.autorepeat […]

Continue reading


Programmatically creating UIView, UISlider, UISwitch Using Swift

UIView   In iOS, UIView class provides rectangular area in the view, this view can render user defined content on the iPhone screen. Here is the very basic example for creating UIView programmatically.   12345var DynamicView=UIView(frame: CGRectMake(100, 200, 100, 100)) DynamicView.backgroundColor=UIColor.greenColor() DynamicView.layer.cornerRadius=25 DynamicView.layer.borderWidth=2 self.view.addSubview(DynamicView)   And your screen will have this :     UISlider […]

Continue reading