i error whenever try use mapview
"use of undeclared type of mkmapview"
and "use of undeclared type mkmapviewdelegate."
i error when trying call sfsafariviewcontroller.
for first two, code is
class pinviewcontroller: uiviewcontroller, uitextfielddelegate, mkmapviewdelegate { @iboutlet weak var locationtextfield: uitextfield! @iboutlet weak var addpinbtn: uibutton! @iboutlet weak var linktextfield: uitextfield! @iboutlet weak var mapview: mkmapview!
the safari view controller code
@ibaction func signup(_ sender: anyobject) { let url = nsurl(string:"https://www.udacity.com/account/auth#!/signup") let safarivc = sfsafariviewcontroller(url: url as! url) present(safarivc, animated: true, completion: nil)
you need import
mapkit
framework access apple map related class , safariservices
framework access sfsafariviewcontroller
. add 2 import
statement in pinviewcontroller
import mapkit import safariservices
remember 1 ting batter if class name start capital latter, change pinviewcontroller
pinviewcontroller
Comments
Post a Comment