5
A
回答
8
- (void) navigateToLatitude:(double)latitude
longitude:(double)longitude
{
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"waze://"]]) {
//Waze is installed. Launch Waze and start navigation
NSString *urlStr = [NSString stringWithFormat:@"waze://?ll=%f,%f&navigate=yes", latitude, longitude];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
} else {
//Waze is not installed. Launch AppStore to install Waze app
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.apple.com/us/app/id323229106"]];
}
}
相關問題
- 1. 集成GSL和Xcode
- 2. XCode和CUDA集成
- 3. Xcode持續集成和Mercurial
- 4. ANDROID將我的應用程序與Waze集成
- 5. 將自定義座標設置爲函數,Waze集成
- 6. Xcode 4 git集成
- 7. SonarQube與XCode集成
- 8. Facebook與xcode 4.2和ios5的集成
- 9. Interface Builder和Xcode集成不起作用
- 10. Waze API for Android
- 11. 集成Bullseye覆蓋與Xcode
- 12. 在Xcode 4中集成mogenerator
- 13. 創建/集成XCode項目
- 14. 將Facebook集成到Xcode 4.3
- 15. iPhone的持續集成xcode
- 16. 將Facebook Docset與Xcode集成
- 17. Xcode 6遠程集成
- 18. 將GSL集成到iPhone Xcode
- 19. 集成Waze鏈接/任何應用程序在Flex移動應用程序
- 20. iPhone Xcode相機集成教程
- 21. iOS上的持續集成xcode
- 22. KIF與使用Cocoapods的Xcode集成
- 23. 集成CocoaLumberjack 2.2.0版本的Xcode 7.2
- 24. 在xcode中集成開放標識
- 25. Google +在xcode中的集成7.2
- 26. RTC(Rational Team Concert)與XCode集成
- 27. Xcode 4.2中的核心繪圖集成
- 28. Xcode的集成 - 權限被拒絕
- 29. 在Xcode中集成Mosquitto最新庫
- 30. 集成AppLovin與迅速xcode 6.4
我試了一下,真正的手機,但什麼都沒有發生:( –