Tagged Questions

iOS is an operating system for mobile devices developed by Apple Inc. that is currently used in their iPhone, iPod touch, iPad, and Apple TV (2nd generation) devices. It shares a lot with Mac OS X, but is optimized for touch-based interfaces.

learn more… | top users | synonyms

4
votes
2answers
52 views

Fetch plist file

I have a plist file with many nested dictionaries inside of it, and I wanna fetch them all to my code. Isn't there any more efficient way to do that than nested for-loops? ...
5
votes
0answers
73 views

Defining a simple function-calling operator

I have been writing Swift code for a while and have read a lot of tutorials about how functional paradigms can be applied to Swift. I defined a simple operator: ...
2
votes
0answers
12 views

UIScrollView Category utility function for auto sizing contentSize

I wanted a utility function on UIScrollView to automatically size the contentSize based on the content inside the scrollView. How is this? ...
3
votes
0answers
39 views

Error-handling #ifdefs for AFNetworking requests

I am using AFNetworking 1.4.3 to send and receive network messages in iOS. My application works slightly differently in DEBUG and RELEASE mode, so I need to use ...
1
vote
1answer
29 views

Correct Implementation of Custom UIView into ViewController Programatically

I am familiar with using scoreboards to construct UI elements in Xcode, but I am only beginning to learn how to make UI programmatically (with out storyboard). I wanted to know if this is the correct ...
3
votes
5answers
100 views

Turning JSON objects into custom NSObjects

Was advised to post this question here after posting to Stack Overflow. I'm pre-populating a UITableView app with data using a local JSON file. The JSON itself is very simple: ...
1
vote
0answers
21 views

Is this an acceptable way to map JSON objects to custom NSObjects? [duplicate]

I'm pre-populating a UITableView app with data using a local JSON file. The JSON itself is very simple: ...
3
votes
0answers
92 views

Core Data model for test-taking iOS app

I'm building an iOS app for test-taking and I want to be sure of my model before proceeding. I found this post very helpful and tried to implement a simplified version for Core Data. Here are some ...
3
votes
3answers
312 views

Determine if a string has all unique characters

I'm practicing algorithms (for future interviews) while learning about Big O notation and was wondering if there's a faster or more optimal way of writing an algorithm to see if a string has all ...
5
votes
1answer
198 views

Road to MVC: the case of Settings Table View Controller

Now that I know that MVC can help do better code, I want to make my SettingsTableViewController class conform to it. ...
1
vote
2answers
128 views

Repurposing UITableView infinite scroll configuration/properties

Had my first go at implementing infinite scrolling for UITableView's in my iOS app last night, and I noticed I ended up copying/pasting quite a bit of boilerplate from one VC to the next (if I wanted ...
12
votes
1answer
1k views

Rewrite code from Objective-C to conform with Swift power tools and concise style

I started a project with Objective-C and rewrote it with Swift. The project contains two UITableViewControllers: MasterViewController and DetailViewController. ...
6
votes
2answers
199 views

Array from file

I have this code which is performed each time I click the 'show polygons' button. The problem is that it takes a few seconds to finish running through the code before actually drawing the polygons + ...
3
votes
1answer
130 views

Images viewer from URLs with download progress

I've created an imageViewer that will be initialized with a String array, and will download and show the images as needed. Alongside a review, could you give me a ...
3
votes
2answers
100 views

Keeping UI code DRY in iOS projects

I've subclassed UI button and used it in my View Controller's viewDidLoad method, like so: ...
3
votes
2answers
100 views

Thread-safe, in-memory LRU cache with a maximum item count of 10

I'm attempting to master LRU Caching. It must be thread safe, and it should preferably perform as well as web image-cache, (avg ~1MB). Please take a look to see if there's anything wrong, amiss, ...
4
votes
1answer
43 views

Model class for networking that uses notifications

I just finished a model class that represents an Instagram Networking client for my iOS app. I am specifically looking for a review of my use of static constants. These are strings that represent ...
6
votes
1answer
119 views

Clustering markers on Google map on zoom

I have a method that is getting called when someone zooms camera on the map (Google map). I recalculate the positions of markers of map and the code is clunky and not effective. I iterate over arrays ...
2
votes
1answer
148 views

UISegmentedControl with view-animation

I have create a UISegmentedControl and a view under it. The view under contains all a view for each segment. I am doing an animation when the segment is changing. ...
-1
votes
3answers
186 views

iOS coding style

I am new to iOS development. I wrote this code, but the company said that this is bad architecture and is not acceptable. I want to improve this code. ...
5
votes
1answer
81 views

Showing a certain screen depending on a particular status

In this iOS app I'm working on, there are two landing screens shown to the user depending on a particular status. The screens are Login screen and Activate screen. Let me explain what this Activate ...
12
votes
3answers
361 views

A flashing ! exclamation ! point ! bar

I have this Objective-C code for use in an iOS app that makes a 'bar' on the screen, with a red exclamation mark that flashes in it at random places. Here's what it looks like: Header file: ...
1
vote
2answers
214 views

Passing Row Index of TableViewCell (custom) to another view controller [closed]

I have been trying to achieve the below requirements to get them working. Am I doing it the right way? We have a table with customised Cell (say: ...
3
votes
1answer
62 views

Potentially superfluous iOS interface system

I have written an interface system for iOS that allows interface elements to be moved around on the screen as actors move around on stage. It can operate within a ...
4
votes
1answer
99 views

Created 2 new classes to represent my backend service and persisted data in iOS app

I just created 2 model class for my iOS app: HALUserDefaults represents the persisted data in my app. It has the ability to both retrieve persisted data and store ...
5
votes
1answer
167 views

Calculating delta in SpriteKit using Swift

I am attempting to learn swift by refactoring one of my old games and I need to rewrite my update method which calculates a delta time. This code works but is ugly. ...
11
votes
2answers
2k views

Is it still necessary to check for a front camera?

I'm trying to clean up redundant old code, so I'm asking this general question. Since all iOS 7 devices have a front camera, would it be safe to remove the code to check if the device has a front ...
4
votes
1answer
79 views

Cleaned up a small MVC refactor in iOS app

I have a view controller on my app, where the user is shown a table view. The table view displays their address book contacts and allows the user to select any friends that they would like to invite ...
3
votes
1answer
76 views

Very small start to MVC refactor in iOS app

I started to refactor my app to MVC today. I wasted a lot of time because of simple mistakes. One was I kept trying to access the getter method inside of my custom getter method, which just causes ...
8
votes
1answer
240 views

Unhandled Exception handler that captures a screenshot

So, whether you're still in the development stages or your app is already on the app store, you always hope your app isn't crashing. But if it is, you want to be sure you've got good crash reports, ...
10
votes
1answer
141 views

First simple program; counting button presses

This is my first solo Objective-C program... it does the complicated task of displaying a button and counting how many times it's been pressed. It retains that count (along with the last time it was ...
3
votes
1answer
83 views

Class / Superclass / Specific class matching condition, can it be simpler?

I recently built a way to automagically dismiss firstResponders for an app I'm building. Is there a more efficient way to approach this? ...
6
votes
2answers
169 views

User Interface for Strategy Game

I've been working a strategy game for iOS for a little while, and each time I add functionality to the game model I'm finding myself building a lot of UI code to sync up with it. I believe that my ...
7
votes
1answer
158 views

iOS7 ChessGame UIChessboardView Design

I've been designing UIChessboardView in the likeness of UITableView using protocols and delegates. UIChessboardView.h ...
3
votes
1answer
166 views

Model to handle all the data/networking from Foursquare API in IOS

I posted not too long ago, asking for tips/improvements I could use on my models. I have changed quite a lot, so I thought I'll give it another go. My model is supposed to handle all the data I get ...
5
votes
1answer
74 views

App for listing places close by - building up models

I'm fairly new to Objective-C. The app I'm trying to make, is using the foursquare API to list up places that is close by. I've re-written this app more times than I care to admit, because I feel the ...
5
votes
1answer
2k views

Better way to fetch JSON data from a server from iOS app

I have successfully coded a network request to fetch JSON data from our server. The remote function is written in ColdFusion. However, the code is quite lengthy and involved. I also noticed in the API ...
1
vote
1answer
1k views

App for making calls to web services - AFNetworking 2.0

I've built a base class that I use a lot in my iOS app to make calls to web services. I built the base class to make the actual call and this base class is only ever used by another class. The idea ...
3
votes
2answers
237 views

Simple iPhone Notes app

I'm a beginner developer, I'm learning online (mostly from the Apple documentation guides), and couple a days ago I started a notes app project. It's the first app I'm building without a guide. It's ...
6
votes
1answer
175 views

Obfuscating iPhone Password

If I need to obfuscate an iPhone password that is hardcode (Oauth Client Identifier and Client Secret), would this be a way to do it? ...
4
votes
1answer
111 views

Random quote generator

I just began learning programming and I'm learning Objective-C. I'm taking an online course and in that course we were doing a magic crystal ball app. Then I decided to use what I learned and make my ...
5
votes
2answers
391 views

Is this a decent first Objective-C project, and can others learn from it?

This isn't my first time coding in Objective-C, but I do sometimes fantasize about there being a de facto standard "practice" project. I'm toying around with this code, and I'd like your input. ...
2
votes
1answer
394 views

Separating Game Logic from Rendering - Sprite Kit

I've been working on a game prototype for a couple days and I think that code review would be really helpful. The basic idea of the game is that you are controlling some dwarves, and you dig up ...
2
votes
1answer
230 views

Best way to refactor this loop of animations with delay?

I have some animations happening after some delay calls the code to animate. It works fine, but the code to call the functions is not nice. ...
8
votes
1answer
237 views

NSInvocation Implementation

I'm using NSInvocation as a choke point in my app to help manage threading and reduce the amount of redundant code. The purpose of this class is to pass arguments ...
7
votes
1answer
111 views

Storing icons statically as strings in custom class

I have a class that I call "Icons" Icons.h ...
1
vote
0answers
443 views

Pick up and throw simulation in SpriteKit [closed]

Last days, I experimented some time with spriteKit and (amongst other things) tried to solve the problem to "throw" a sprite by touching it and dragging. I have tackled the major hurdles, and the ...
5
votes
3answers
2k views

Custom iOS chat interface design & functionality

Preamble So, as most of you have likely also noticed, chat components, at least at a basic level, are becoming very common with lots of apps. I found myself tweaking and redesigning the interface ...
3
votes
1answer
119 views

Singleton With Sub-Singletons

I've found myself wanting an easy way to implement chat into various apps, so I developed a set of classes for the firebase.com backend that make it easy for me to quickly set up the nuts and bolts of ...
6
votes
2answers
411 views

iOS App - Interface for user log in using a call to a web service API

I have a navigation controller set up with a user code and password and a log in button. When the user clicks on the Log In button or the return key on the keyboard on the password text box - the ...