iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

Parse multipart response for image download in ios

In my application, I’m downloading image from server as multipart content. In my response data I’m getting 2 parts: one is json content and other is downloaded file. The response is in following format. –poa89012-3212-1232-9201-fdsakjkj921 Content-Type: application/json; charset=utf-8 Content-Disposition: inline; name=info { //json content } –poa89012-3212-1232-9201-fdsakjkj921 Content-Disposition: file; name=file; filename=photo.png Content-Type: application/octet-stream // File data […]

How to create a back button in a view controller to go to parent view controller

hi I have a view controller with a container and in the container a child view with a collection view when the user taps the collection view cell it sends me to detail view controller but now what i want to do is to add a back button in my detail view controller which sends […]

iPhone memory management (with specific examples/questions)

Hey all. I know this question’s been asked but I still don’t have a clear picture of memory management in Objective-C. I feel like I have a pretty good grasp of it, but I’d still like some correct answers for the following code. I have a series of examples that I’d love for someone(s) to […]

Possible to generate a list of connected bluetooth devices for iOS?

I’m trying to determine what devices are connected via bluetooth in iOS but can’t seem to figure it out. Ideally I’d like to generate a list of connected bluetooth devices. I’ve tried using “retrieveConnectedPeripheralsWithServices” but this requires a specific service to search for. I’d like to generate a list of all connected bluetooth devices, not […]

Changing viewController on Button Click

I am new to iPhone programming. what I am trying is I have one screen with a button. And I want to change the view controller not only the view when I click that button (I know how to add subview) because from that 2nd view controler, I have to go to the third view […]

Add target for UIButton – iOS

Anyoone can help me on how to add action to call the following method using UIButton. -(void)navigatePics:(id)sender andIndex:(NSInteger *)index{}

UICollectionView using sections leaves a gap between cells

I’m using a UICollectionView to show several sections of data. These sections have a fixed number of items. I want all the items to show in a continuous grid. Right now I accomplish this in horizontal orientation: But in vertical this leaves a big gap: I want to solve this gap between sections because it’s […]

How to upload multiple images in multipart using Alamofire?

I am stuck in uploading multiple images in multipart using Alamofire. Can any one help me? Thanks in advance!! For more details, I am using this code to create body part of images data: func imageArrayToNSData(array: [UIImage],boundary:String) -> NSData { let body = NSMutableData() var i = 0; for image in array{ let filename = […]

swift – touchID takes long time to load

I’m working on integrating touchID into my application. The process was fairly simple, but even just using my dummy data, it takes about 5 seconds after it authenticated my fingerprint, before it performs it’s task. Here’s my code: func requestFingerprintAuthentication() { let context = LAContext() var authError: NSError? let authenticationReason: String = “Login” if context.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, […]

Allow only access to camera device in HTML5

I’m currently developing application using the camera for iphone in HTML5 with <input type=”file” accept=”capture=camera”> The problem is that I have a little list that give me the choose between my library and my camera. My idea is to have two buttons, one for the library and an other for the camera. I know the […]