Sort Dictionary Table in Swift

I am getting an array from response as below items=[{ "displayName": "Adam Codo", "postedTime": "2011-04-04T21:31:20.000Z", "message" : "Hello Test Message" }, { "displayName": "Le

how to maintain the spacing between the uicollectionview cell

In my app I am using using UICollectionView. I want to set fix space between UICollectionViewCell. so how can I do this? here is my code: func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minim

Possible reasons for memory leaks in iOS?

I'm researching possible memory leak traps in iOS and I keep coming across strong reference cycles. This has become clear and the only thing mentioned that I can find regarding memory leaks, even in Apple's documentation. What are some other causes f

Location to save the initial data file?

Warning, I'm a designer, stumbling my way around Swift, so apologies ahead of time for my ignorance. The app I'm working on will ship with a JSON data file with all data (so that the app is accessible without connection). When the app runs I check a

NSURLConnection delegate methods not called in generic class

I have a test class that tries to reach to google with a NSURLConnection. If I try to make it generic, the NSURLConnectionDataDelegate methods are never called. class Remote<T: NSObject>: NSObject, NSURLConnectionDelegate, NSURLConnectionDataDelegat

not able to use Google Map SDK in ios

I am working a simple iOS app into which I am integrating Google Maps. but not getting any result . i have used this steps step 1:i have downloaded Google Maps Mobile SDK from this link sdk ios step 2: Create an API project in the Google APIs Console

How to divide the space evenly between several buttons?

I have four buttons inside a view container. I want to have the space between the buttons automatically resized equally depending on the device's screen size. The view container is constrained as follows: Horizontal and Vertical to Superview Equal Wi

NSURLConnection async thread connection closure

I used NSURLConnection to get some data from internet in thread seperated from the main thread: I put this in my JSONViewController.h : #import <UIKit/UIKit.h> @interface JSONViewController : UIViewController <NSURLConnectionDelegate> { BOOL f

UILabel color and XIB font size changes

I'm having some issues with an app i'm working on. It used to work just fine, but now I noticed that many of the UILabel I have in my XIB have a font and color reset. For example, if I set a white or red color in my XIB, it appears black when I run m

Disable bounce in Mobile Safari Webview using css / js?

I've been trying to find the answer to this question without success. I am programming some webpages for a webview in MobileSafari. I do not have access to the Objective-C to disable the functionality that way. I'd like to provide a smooth scrolling

How to save the html string in the database

I have this html string <p><span style="color: #4f4f4f; font-family: Arial; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15.600000381469727px; orphans: 2; text-align: -w

How to do Regex in Objective-C

I'm always confused with Regex format how they work and how to make Regex according to my requirement. I just copy some common Regex formats and paste in my project but obviously we cant find every Regex format according to our requirement. So i woul

Could my friend launch my iPhone application without jailbreak?

I have done my iOS app, but I don't want to submit to App Store. Shall I pass it to my friend and run on his iPhone without jailbroken? I heard it has some certain certificate allow other guys to run it. I have developer account. would you please pro

Start and stop a particle system in cocos2d

Please, I like to ask how I can start a particle system in iOS /cocos2d, make it run for a certain amount of time say 10 seconds and then have it stopped. A little code snippet or example which will serve as a guide would be appreciated. ThanksAssumi

How to place & ldquo; x & rdquo; number of objects on the view

If the user provides a number, such as 8, how exactly would I place eight labels onto the view? For example: int userGivenNumber = textfield.text; for (int labelNumber=1; i<=userGivenNumber; i++) { UILabel *label = [[UILabel alloc] initWithFrame:CGRe

How to manage authentication in iPhone applications

I'm currently developing my first native iPhone app (though I have many years of experience as a web developer). I'm having some difficulty understanding the best way to handle login and I'm looking for some advice on the best way to go about it. The

Determine the location of a long-term gesture recognition tool

Currently I have Long Pres Gesture Recognizers on four different TableViews (two in each storyboard scene, therefore two storyboard scenes). I create these LPGR's with the following code in my ViewDidLoad method... //Add Long Press Gesture Reconizer

Objective-c Line breaks every 10 characters (Keep words intact)

If I have a string that I am going to load into a TextField how can I make a line break \n occur every 10 characters (including spaces and whatnot) but not go to the next line mid-word... Like wrap the text with a max of 10 characters? But I'm not ju

Custom Title for UILocalNotification

I want to set custom title of UILocalNotification. How can I achieve this.Please suggest.When creating a notification, you can set the text of the notification, and the text of the second button. The title will always be the same as the name of your

When to load the data into UITableViewController?

I am currently loading data coming from a JSON service in the viewDidLoad method in UITableViewController. The problem is that is the data takes time to be retrieved and parsed, the view takes time to be created. Where is the best place to load this

Flex DropDownList works weird in mobile devices

I try to use spark DropDownList Controller for flex mobile project but its not working properly. Is there any alternative solution available?You want to use <s:List/>. As said by @www.Flextras.com, DropDownLists aren't supported on mobile.

IOS View controller shifts after rotation

I am working on an iOS application. My app delegate loads my view controller onto the window and displays it correctly, except for one caveat: the views on my view controller are not down far enough on the Y-axis and the status bar clips my top view.