Custom Picker

screenCustom Picker is an easy to use and customizable alternate to UIPickerView. It is written in Swift language. The Custom Picker started as normal UIPicker but it was to limited in its design and methods. Also, I want to achieve a flat-picker with selected area background customizable which was not possible with default UIPicker.

So I made a use UITableView and customize its scroll to get the look and feel of UIPickerView. With the use of UITableView, I have made the picker flat. Now the second limitation of UIPickerView i.e. non-customizable selected area, for this I used an overlay view and customize it according to my need.

Requirements

It requires Xcode 7.0+ and Swift 2.3.

Application Usage

Custom Picker includes a sample of the project of Unit Conversion where a user can select the to and from units and input the number in one UITextField and the output will be shown in other UITextField.

Create a new picker

To use this picker you have to instantiate the CutomPickerView like instantiate any normal UIPickerView and implements it CustomPickerViewDelegate and CustomPickerViewDataSource methods

    let leftPickerView = CustomPickerView(frame: CGRectMake(0.0, 0.0, self.contentViewOfLeftpicker.frame.width,  self.contentViewOfLeftpicker.frame.height))

    leftPickerView.delegate = self
    leftPickerView.dataSource = self

    self.contentViewOfLeftpicker!.addSubview(leftPickerView)

Implement the Delegate and DataSource

The delegate methods that needs to be overridden are

func customPickerView(customPickerView: CustomPickerView, titleForRow row: Int, forLabel label: UILabel) -> String

 func customPickerView(customPickerView: CustomPickerView, didSelectRow row: Int)

func rowHeightForCustomPickerView(customPickerView: CustomPickerView) -> CGFloat

func labelStyleForCustomPickerView(customPickerView: CustomPickerView, forLabel label: UILabel)

func imageStyleForCustomPickerView(customPickerView: CustomPickerView, forImageView imageView: UIImageView)

Firstly you must rowHeightForCustomPickerView(_:)

func rowHeightForCustomPickerView(customPickerView: CustomPickerView) -> CGFloat {
        return 50.0
    }

Then you have to implement titleForRow method it sets the title for each row in a picker

func customPickerView(customPickerView: CustomPickerView, titleForRow row: Int, forLabel label: UILabel) -> String {

        return (label.tag == -1) ? pickerDataFullForm[row] as! String : pickerDataShortForm[row] as! String
    }

Next is the method that provides the didSelectRow

func customPickerView(customPickerView: CustomPickerView, didSelectRow row: Int) {

        leftPickerView.labelUnitFull.text = pickerDataFullForm[row] as? String
        leftPickerView.labelUnitShort.text = pickerDataShortForm[row] as? String

    }

Next method is labelStyleForCustomPickerView method this method is used to give custom style to UILabel in CustomPickerView

func labelStyleForCustomPickerView(customPickerView: CustomPickerView, forLabel label: UILabel) {
        if (label.tag == -1) {

            label.textColor = UIColor.blackColor()
            label.font = UIFont(name: "HelveticaNeue-Bold", size: 20.0)
        }else{

            label.textColor = UIColor.lightGrayColor()
            label.font = UIFont(name: "HelveticaNeue-Bold", size: 15.0)
        }
    }

And the last delegate method is imageStyleForCustomPickerView this is used to give any background image to the overlay view.

    func imageStyleForCustomPickerView(customPickerView: CustomPickerView, forImageView imageView: UIImageView) {
        if customPickerView == leftPickerView {
            leftPickerView.arrowImage.image = UIImage(named: "LeftArrow")
        }
    }

CustomPickerViewDataSource

The CustomPickerView consists of only one data source method. This method returns the number of rows in that picker:

 func numberOfRowsInCustomPickerView(customPickerView: CustomPickerView) -> Int

iOS App Development trends in 2017

Apple has earned an income of $ 1.8 billion just in the applications and in-application buys over the New Year’s time of 2016. Apple App Store has alone assembled an income of $ 40 billion for the developers. This itself discusses the huge development that App Store has found in every one of these years furthermore for the developers.

Due to constant arrival of new gadgets and devices with varied features, the application engineers must be constantly on board updating as well as overhauled on learning in view of the latest patterns in versatile application advancement, for an increase in improvement in the zone of iOS application development.

Mentioned below are some of these iOS app development trends:

Swift Coding

Swift has picked up fame among the application developers for its comprehensive scope of systems and coding techniques. It deals with present day compiler foundation that empowers to compose solid codes utilizing Xcode instruments. As such, Apple’s Swift Programming has increased over Objective-C. Be that as it may, as Apple’s Swift went open source in 2015, there is an expanding number of clients embracing to Swift and this has surpassed the volume of clients for Objective-C.

There are many points of interest in Swift Programming, friendly codes and ease of learning as well as a lot of scopes to build, improvement, adapt and usability. 2017 will be a year which will see a select use of Swift 3.0, helping in the improvement of applications on iOS, watchOS, and tvOS. Swift will rise as the essential apparatus for creating Apple applications by supplanting Objective-C.

Applications driven by GPS and Augmented Reality

The little and the medium endeavors are progressively embracing area based versatile application improvement. This is advantageous in furnishing shoppers with data on items or administrations, surveys, examination of costs and a great deal more such exercises for versatile business.

GPS as a driver for portable application advancement was seen as the accomplishment of Pokemon Go in 2016. Be that as it may, we see a greater amount of these GPS-empowered applications in retail and robotization. The iOS application developers in 2017 and the years past will utilize a blend of AR and GPS.

Other application regions, for example, 3D Games will likewise observe the developers investigating the progressions on GPS innovation. As the clients open up to area based administrations, the fundamental sympathy toward the iOS application improvement is security,

Applications focussed on IoT

The quality of developers for IoT-based applications ascended by 34 % in 2016. We have seen an expanded income on the endeavors construct just with respect to IoT. The iOS application developers will attempt to exploit the market in light of Internet-empowered gadgets. The versatile application advancement on iOS will make esteem included applications for most extreme usage of the IoT items.

The concentration zones for iOS engineers in 2017 are the acknowledgment of signs from sensors in the IoT gadgets and in addition a safe trade of data over the Wi-Fi systems.

Security

iOS has picked up significance on account of its thoughtfulness regarding protection and security. Portable information security has grown up to a remarkable level, bringing on a range of sympathy toward the innovation goliaths. Apple has effectively stepped forward in the correct bearing as App Transport Security (ATS), which is to be made obligatory for the iOS applications. We will see more creative and more grounded information encryption innovations in 2017 and genuine endeavors are put into this range by the iOS application developers.

Undertaking Apps in light of iOS

There is a surge in big business portable application advancement and this is reliant on two components, constant client cooperation and engagement and progressively overseeing information and assignments.

There are numerous open doors that manifest for the iOS application developers in creating venture applications. Venture applications are getting based on CRM of the association, utilizing nimble approach.

There will be a mix of huge information, IoT and endeavor portable application advancement that will be progressively utilized for iOS application improvement.

The volume fight is constantly won by Android as there is a higher number of Android-based gadgets yet iOS dependably wins the race for acquiring more prominent income. In this way, income turns into a noteworthy motivator for iOS application improvement.

QICE is a leading mobile app development company in India helping clients to increase their business visibility over the mobile. In today’s technological world it is imperative that each company owns a mobile app. Nevertheless, just owning a mobile app of your company promoting your business won’t do wonders for your business.

It needs proper assessment,  designing, development, testing, and marketing. We are there to bring into being the mobile app that suits specific business needs.We have the expertise and the skills in developing the application for various platforms like iPhone, iPad, and Android.