Questions tagged [cocoa-touch]

Cocoa Touch is a UI framework for building software programs to run on the iOS operating system from Apple, Inc. It is based on the Mac OSX Cocoa API toolset.

Filter by
Sorted by
Tagged with
3
votes
1answer
50 views

Core Data Wrapper

I built a wrapper in Swift to practice CoreData. My question is more general, I hope this is acceptable. I wanted to know whether my implementation of this wrapper is correct or poorly implemented ...
3
votes
1answer
384 views

Presenting and passing data to a modal view controller without using prepare(for:sender:) method

I am using a toolbar button to present a modal view controller (in which I let the user export data as a PDF file). The main section of my app is a ...
2
votes
1answer
217 views

Handling several types of messages over a web socket connection

I have a UIViewController with a Socket Connection established once viewDidLoad. This web socket is a multi-directional ...
2
votes
1answer
1k views

Filtering input characters for a numeric text field using logical operators

I did my code for "Bronze Challenge: Disallow Alphabetic characters" exercise in "iOS programming" book by Big Nerd Ranch (p.85). When I did the exercise I also changed code of func textField which ...
5
votes
1answer
3k views

Swift 3 UIPicker

I have been making a little test app to try and learn Swift 3 / iOS better. I started a while ago with with Swift 2 but stopped, so getting back into it, but there is so much iOS to learn! It seems ...
1
vote
1answer
51 views

Sorting Timestamped Messages (iOS)

An app I'm building professionally includes rudimentary text messaging. It allows users to send from the phone, and it polls for new messages (I know, yikes. Push notifications are a future task) with ...
2
votes
1answer
2k views

iOS MQTT client app base view controller

I've been working on an iOS IOT client app which uses MQTT. After some reading I decided to go with CocoaMQTT. I have only been programming in swift/iOS for about 2 weeks now, so I thought I should ...
1
vote
0answers
325 views

Unit testing - Parsing data from the Weather Underground API

I'm writing unit tests for the first time. The tests are for my library on Github. I downloaded the JSON and stored it into a local file that looks like this: ...
6
votes
1answer
370 views

Find the next 7 o'clock NSDate

In my very specific scenario, I need to get an NSDate holding the next time the hour will be 7 (either AM or PM). On the case that this is the first time to do ...
1
vote
2answers
355 views

Archiving data in file system for iOS

Being my first time archiving data to the file system, I would like to have my code reviewed. This simple test project works as expected, but I want to see if what I am doing is following best ...
3
votes
1answer
187 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? ...
8
votes
1answer
371 views

iOS7 ChessGame UIChessboardView Design

I've been designing UIChessboardView in the likeness of UITableView using protocols and delegates. UIChessboardView.h ...
6
votes
2answers
3k 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 ...
5
votes
1answer
3k views

UIView subclass

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 ...
6
votes
1answer
878 views

Logic in a card matching game controller

I have a card matching game with a model of: Card Deck PlayingCard ...
4
votes
1answer
673 views

NSFetchedResultsController implementation

I'm using both Core Data and NSFetchedResultsController. Is there anything I can improve on? ...
7
votes
1answer
164 views

Upgrading animation code

I understand that this animation code is outdated: ...