Day-13 Flashcards

1
Q

Parse GeoPoint

A

Parse is setup to allow you to easily incorporate locations into your data set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

PFQuery

A

PFQuery has a restriction called whereKey:nearGeoPoint: that lets you query on a location based field

Using a nearGeoPoint constraint will limit results within 100 miles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

PFSubclassing

A

subclassing PFObject makes it feel more like regular model objects and makes it so we can work with regular properties, instead of the subscripting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
To use (.) notation instead of Strings @"unsafeString"
and create PFObject
A
  • Make a class that subclasses PFObject
  • Make the class conform to the PFSubclassing protocol
  • Implement the class method parseClassName on your class
  • Import PFObject.h in your .m file
  • Call [YourClass registerSubclass] in your app delegate before you call setApplicationID:clientKey:
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Map Overlays

A

Overlays offer a way to layer content over an arbitrary region of the map

An overlay object, which is an instance of a class that conforms to the MKOverlay protocol. This object manages the data points of the overlay

An overlay renderer, which is a subclass of MKOverlayRenderer that does the actual drawing of the overlay onto the map

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

_ _ weak & _ _ strong

Make a controller weak then Strong in a block

A

Avoiding the retain cycle.
We only do this in a block that references self.

_ _weak typeof(self) bruce = self; (make the current controller weak because it has an strong reference originally)

//The block for completion that requires a strong reference to the self(controller)
    newReminderViewController.completion = ^(MKCircle *circle){
   //make the controller strong again
     _ _strong typeof (bruce) hulk = bruce;
 };
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Broadcast Pattern & Notification Center

A

The notification pattern is used to pass around information related to the occurrence of events

Each program, or app, has a default notification center you can access with [NSNotificationCenter defaultCenter]. Almost always you will be posting notifications to this center

A notification center delivers notifications synchronously. To send them asynchronously you will have to use a notification queue

1) addObserver:selector:name:object

deallocat it with:
2) removeObserver

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Dangling pointer

A

Pointer to deallocated object that doesn’t live in the memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly