How do I add dashed line border around UIView.
Something Like this

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can set the border with this pattern using Layer and Bezier path like below examples.
Objective-C
Swift 3.1
You can also set different types of design using pattern image like below example.
Here you’ve to add
<QuartzCore/QuartzCore>framework in the project and import it with below line inYourViewController.mfile.