Conversation
| @@ -0,0 +1,26 @@ | |||
| # Xcode | |||
There was a problem hiding this comment.
Het lijkt me nogal onnodig om een extra git met eigen git ignore toe te voegen. Dit moet er dus uit vrees ik
|
|
||
| ## SideNote | ||
|
|
||
| 1. When having to react to delegates, like for example UITextFieldDidEndEditing(), it seems unlikely that you're not going to retain your viewModel inside the collectionViewCell. Isn't "never" a bit harsh? |
There was a problem hiding this comment.
As debated this is not the way to go. I know we do it but it brakes design pattern.
Always delegate changes to the ViewController so he can handle the changes:
- Deside if screen needs to be updated
- Save changes if needed
- Update the ViewModel from the detail changes.
|
|
||
| 1. When having to react to delegates, like for example UITextFieldDidEndEditing(), it seems unlikely that you're not going to retain your viewModel inside the collectionViewCell. Isn't "never" a bit harsh? | ||
|
|
||
| 2. So when only displaying a certain amount of data ,structs are the way to go, but as soon as we need to display more or edit data , viewModel? |
There was a problem hiding this comment.
Struct or class do not mather. A ViewModel is used to display the content to the user. This can come from a model that is a class, struct or evan a single string of json.
| @@ -6,8 +6,16 @@ | |||
|
|
|||
| 2. Why is using Introspection important when we already imported and conformed the ViewController to the "DropboxLoginable" protocol? | |||
There was a problem hiding this comment.
Because some functions can be imptionally implemented in Objective-c
|
|
||
| 3. If modules are theoretically the better option over #import for things like UIKit, why do we still use #import <UIKit/UIKit.h> | ||
| ? | ||
| 3. Can't you just cast the nav.topViewController to the desired class instead? |
|
|
||
| 4. If performSelector has no target given, will it use the target it is being called from? e.g. | ||
| ```Objective-C | ||
| [aClass performSelector: @selector(aSelector)]; |
There was a problem hiding this comment.
In this case aClass is the target. Yes so it is implicit.
| [aClass performSelector: @selector(aSelector)]; | ||
| ``` | ||
|
|
||
| 5. If modules are theoretically the better option over #import for things like UIKit, why do we still use #import <UIKit/UIKit.h>? |
There was a problem hiding this comment.
Compiler translates this to @import UIKit; So it is just legacy reason. Btw you can also use @import UIKit.UIKit.h; If you really want to.
| }]; | ||
| ``` | ||
|
|
||
| 3. Explain the difference between NSOperation and GDC please. |
There was a problem hiding this comment.
This is just a different set of API. GCD (Grand Central Dispatch) (not GDC). Is the lower level. NSOperation is a layer above this. It's main difference is:
- Easier to add interdependencies between operations
- You can stop an ongoing operation
- Object oriented api instead of a procedural api
- Used for inter operation communication. Operations can communicate from a different queue to another queue while still in process. This is more advanced usage.
|
|
||
| 3. Explain the difference between NSOperation and GDC please. | ||
|
|
||
| 4. NSDictionary 'bindings' argument in NSPredicate filtering? |
There was a problem hiding this comment.
If you still need answer to this question please ask it again. I don't quite get the question now.
| @@ -13,7 +13,7 @@ | |||
|
|
|||
| 1. What's the importance of 'arrayWithCapacity' when mapping an array. Is this required? | |||
There was a problem hiding this comment.
The main difference performance. ArrayWithCapcity reserves memmory where the mapped array will go into. If you do not do this code will work but with every added element the processor will have to go look for more memory for the next elements. This is more processor intensive the reserve the memory up front if you know the expected length of the array before you calculated the data.
No description provided.