【问题标题】:Passing Coordinates between Views [duplicate]在视图之间传递坐标[重复]
【发布时间】:2012-01-14 20:29:42
【问题描述】:

可能重复:
Passing Data between View Controllers

我有两种观点: 1) 地图视图 2) 详细视图

我想将坐标从地图视图传递到详细视图。 坐标.纬度和坐标.经度

如何传递坐标。

【问题讨论】:

标签: objective-c xcode4 ios5


【解决方案1】:

有很多方法可以做到这一点。其中之一是与财产。因此,您将在地图视图中拥有属性声明,然后能够通过 someMapView.propertyName 访问它。

希望对您有所帮助。

【讨论】:

  • 我该怎么做呢?我不太确定谢谢你的帮助
  • 在您的标头中:@property(nonatomic, retain) SomeType *someVariable 这就是您在标头中声明属性的方式。确保在实现文件中使用@synthesize,并在dealloc中释放;我假设你没有使用 ARC。
猜你喜欢
  • 1970-01-01
  • 2021-03-17
  • 2019-08-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多