English 中文(简体)
UITextview UITextview 数据检测器TypeAddress - 以不同应用程序打开的地图
原标题:UITextview dataDetectorTypeAddress - Map opened in different application

我只是来了解 UIText Views 的一个很棒的 ios 功能, 即 < a href="http://mobile Developmentertips.com/user- interface/ create- kickable- hyperlinks- from- a- url- hone- number- or- address.html" rel= “nofollow norefererr" > UITextview 数据探测器Types 。 将文本显示为链接非常有用 。

然而,我注意到一件事。当字符串是一个物理地址时,谷歌地图是打开的,这是适当的,但用不同的应用程序。

是否有办法可以在应用程序中打开谷歌映射, 而不进入打开映射的默认 iOS 应用程序? 这样我就可以从映射返回我的应用程序 。 是否有任何代表方法可以控制它? 现在我必须尽量缩小应用程序( 让它在背景中运行), 然后再打开看起来不妙的应用程序 。

最佳回答

你应该用另一种方法来解决你的问题

如果您使用数据检测器Types, 链接将首先在内置应用程序中打开。

您可以按以下按钮和自定义字符串进行动作 :

  • 将文字插入 UI 按钮 。

  • 将您的文本作为链接显示, 与此问题中的“ NASATRITEDSring” 链接, 使用 UI 按钮而不是 UITextView :

  • make action for your button when user click on it.

祝你好运!

问题回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签