Tag Info

New answers tagged

0

There's one special architecture they call VIPER (View, Interactor, Presenter, Entity and Routing). I'll try resume here what you need know: View they are dummy views; contain objects like UIView, UIViewController, UILabel, etc; waits the content from the Presenter; handle user interaction and pass it to Presenter layer. Presenter doesn't know UI ...


1

You have already mentioned the modules, if the code is already making sense to be logically grouped in that manner, continue with that. It may be unavoidable to have a gatekeeper object that grants access to the modules, but every module would control access and functionality tied to it. Going back to basics and keep it DRY and keep it SOLID help delineate ...


1

Looking in the future, that class will be so huge that will be difficult to maintain it. Even if I group calls by the same module (user authenticate, user profile, etc.) it will be overpopulated. Maybe it's time to refactor into multiple classes having these 2 principles in mind: Maximum 5 public methods by class (rule of thumb) A class should do ...


0

I was actually able to solve my problem by using Firebase instead of Parse. I wanted real-time updating and Firebase provided that with ease. Here's my code for the View Controller: // // ViewController.swift // Firebase Test // // Created by Cole Smith on 7/24/15. // Copyright (c) 2015 Cole Smith. All rights reserved. // import UIKit import Firebase ...


1

How about option 3. Put the CVCalendarView on the VC's view, and a UITableView under the CVCalendarView. When the user taps a day, reload the table view with the new data. Since the calendar view is not in the table view, it will not need to be reloaded. When the user scrolls through the events of the day, the calendar will stay put. That's how I would do ...


1

Here are my views on the various observation patterns. I may update this list over time if comments seem to require it. Callback with closure: This is great if you have some sort of one-shot thing (like a network response), or multiple responses that all need to be handled the same way. Not so good if you are expecting multiple responses which need to be ...


2

The difference between using plist, xml etc, and SQL whether raw or as one of the persistence options in Core Data is that the non-SQL solutions will load the entire persisted document into memory while SQL will only load what is needed at the moment. In your case, it seems like you have so little data that SQL is over kill. You could use a plist generated ...


0

Singletons are a bad idea in the Apple API. Objective-C does not support singletons, instead, you create one instance that blocks the formation of any others, a crude work around IMHO, that doesn't always work. I don't think is any better in Swift and given it has to support the Objc API, I doubt it. The preferred method to ensure a single instance is to ...


0

You might be able to interface it by using an intermediate device (Arduino+shields?) that supports both BLE and classic Bluetooth SPP to relay data.



Top 50 recent answers are included