I have an array with several dictionaries. In every dictionary I have some information. I want to add a point on the map for each item inside the array. I do not have anything but didSelectForAnnotation method, how do I get inside the array as certain information of that object? In a table I would use the indexPath but an annotation does not have that indexPath. Is there a solution??
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- Using if let syntax in switch statement
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
If you want to set custom information with you
MKPointAnnotation
then you need to subclass it and create a custom property that you can use latter to differentiate it from other array object.Now you need to create annotation with
MyAnnotation
class, and set the arrayIndex with your array index where you are creating annotation.Now in
didSelect view
method of mapView you can get that index.