Posts

UIStepper action with apply the value to the label iOS swift

 Solution: I had connected the stepper for action with change value.While user clicks + or - action then it will be apply the value to the stepperlabel using the below code.Stepper don't had any label you have to connect with other one.   @IBAction   func   didTaponStepper ( _  sender:  Any ) {          stepperLabel . text  = (sender  as !  UIStepper ). value . description     }

Dropdown with custom view swift || dropdown option with customcell in swift

Image
 Solution: {      let  dropDown =  DropDown ()      var  control: UIView ! = btn. plainView      var  items:[ String ] = []      for  value  in  values {          let  name = value[ "name" ]         items. append ( " \(name) " )     }     dropDown. anchorView  = sender !=  nil  ? sender : control  // UIView or UIBarButtonItem     dropDown. selectionBackgroundCo lor  = . gray     dropDown. direction  = . any     dropDown. dataSource  = items     dropDown. cellHeight  = 60     dropDown. separatorColor  = . gray     dropDown. cellNib  =  UINib ( nibName :  "Cell" ,  bundle :  nil )     dropDown. customCellConfigurati on  = { [viewContro...

While using event identifier after save the event the identifier changes in calender type exchange

 Solution: You can try that after save wait for 2 seconds and then get the event identifier it will works.but its not a good solution. You don't have to save the eventidentifier in your reference.Instead of you can fetch the event with start date,End date and title using predicate.

PublishSubject cell issue RXswift

 Problem: class  myC ell :  UITableViewCell  {      @IBOutlet   weak   var   NameFld : TextField!      var   disposeBag  =  DisposeBag ()           override   func   awakeFromNib () {          super . awakeFromNib ()          // Initialization code     }      override   func  setSelected(_ selected:  Bool , animated:  Bool ) {          super . setSelected (selected,  animated : animated)          // Configure the view for the selected state     } } The above is my code It produces error that if i tried for reuse that cell all values collapsed Solution:      override   func   prepareForReuse () {          disposeBag  =  DisposeBag () ...

create dropdown using materialdesign in swift iOS

 Solution: You can achieve the dropdown as like below. 1.First you have to create an imageview with dropdown arrow 2.Then after create textfield using material design pattern 3.Set the imageview as trailing view to the textfield then set the trailing view mode as always 4.Below code we can set the dropdown as well as field required symbol as placeholder also image tint color.Finally we can set the height of textfield and placeholder color          let dropdownImage = UIImageView()         dropdownImage.image = UIImage(named: "arrow_down_black_24pt" )             dropdownImage.frame = CGRect(x: 0 , y: 0 , width: 30 , height: 30 )               let tf = MDCOutlinedTextField()              tf.frame = CGRect(x: 10, y: 10, width: 200, height: 50)              tf.label.text = required == 1 ? placeHolder...

Create textField and textView with required asterisk symbol using materialdesign iOS swift

 Solution: You cannot be able to set asterisk symbol in the textfield.instead of you can append in end of the placeholder text to achieve that.              field.label.text = placeholder.appending( "*" )

RXSwift history

 Solution: In 2012 microsoft had launched rx for their .Net framework for dynamic prototype for open source. After that it has derived with rxJS, rxSwift,rx.Net,rxJava had derived for MVVM framework