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

0
votes
0answers
16 views

Making a webService file smaller

I'm developing an iOS app, and I have a file, WebService.m, that is now 2300 lines long. My file contains all the web service calls on my app, with their parsing if successful, like: ...
3
votes
1answer
27 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: ...
-1
votes
0answers
43 views

Thread-safe, in-memory LRU cache with a max item count of 10 - follow-up

The following code is the revised/feedback version of my previous post. The big change was converting RicCache class object to an instantiated object. I'm ...
2
votes
2answers
36 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
30 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
29 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
40 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
157 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
68 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
320 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
116 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
60 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
82 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
86 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
63 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
64 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
146 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, ...
9
votes
1answer
111 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
76 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
141 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
138 views

iOS7 ChessGame UIChessboardView Design

I've been designing UIChessboardView in the likeness of UITableView using protocols and delegates. UIChessboardView.h ...
3
votes
1answer
126 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
72 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
1k 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
753 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
152 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
150 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
98 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
298 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
319 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
180 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
227 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
90 views

Storing icons statically as strings in custom class

I have a class that I call "Icons" Icons.h ...
1
vote
0answers
336 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
1k 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
110 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
295 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 ...
2
votes
1answer
375 views

UITableView 'hidden' section causing more memory allocations every time on pull to refresh

I'd like to see how to improve this code. I have a UITableView that I'm 'hiding' a section when the user taps on that section's header. I thought this was a pretty cool implementation I came up with, ...
4
votes
1answer
200 views

AVCaptureMetadataOutputObjects Wrapper

With iOS7, Apple introduced AVCaptureMetadataOutputObjects, which is used for scanning barcodes. If you check out the web for how to scan barcodes in iOS, almost ...
6
votes
1answer
116 views

How can I condense several IBAction methods in a class with a delegate?

I have the following class: MyProtocolClass.h ...
4
votes
1answer
3k views

UITableView cellForRowAtIndexPath

I'd like to see how I can improve this code, as I know it's bad practice to have cell reuse identifiers like this, but I could not find any other way to keep the cells that contain images from calling ...
5
votes
1answer
246 views

UIView subclass – done right?

Generally, UI code is painful and full of kludges. (At least, mine was like that.) Recently I have decided to put an end to it and try to learn how to write good and reusable UI code. So here is the ...
8
votes
2answers
3k views

Game with tile map - Sprite-Kit

I'm a novice programmer learning Objective-C in my spare time. I would greatly appreciate any help or advice with my code. I want to follow best practices whenever possible. I know that I am ...
4
votes
1answer
162 views

Configuring Constructor Parameters and Unit Testing

Currently working on writing out some test for an iOS enterprise application. My concern is in this set up of my overloaded constructor. ...
4
votes
1answer
91 views

Assigning initial value via getter or viewDidLoad

I've been coding in a vacuum for several years and am trying to get up to speed on best practices, in anticipation of my eventual return to employment. I'm hoping this is the best forum in which to ...
6
votes
3answers
151 views

HTTP scraper not clean and straightforwardly coded?

A job application of mine has been declined because the test project I submitted was not coded in a clean and straightforward way. Fine, but that's all the feedback I got. Since I like to ...
2
votes
2answers
571 views

UIGraphicsImageContext Memory Spike - Reducing Footprint

I have a UIImage Category for iOS Objective-C which tints an image based on a given UIColor value. You can take a look at the method below: ...
6
votes
1answer
771 views

Canonical Implementation of a Subclass of NSOperation

I would like to develop a kind of template or canonical implementation for a concurrent subclass of NSOperation. Requirements: Thread safe API. ...
3
votes
2answers
1k views

Multiple serial URL requests in Objective-C / iOS

I want to check the existence of various API endpoints by doing serial URL request. If the first one fails, I want to try the second one, if the second fails I want to try the third one, etc. Here is ...