我正在尝试在iOS 8上使用MapKit并且我不断收到错误:
Trying to start MapKit location updates without prompting for location authorization. Must call
-[CLLocationManager requestWhenInUseAuthorization] or -[CLLocationManager
requestAlwaysAuthorization] first.
Run Code Online (Sandbox Code Playgroud)
在这里查找,我发现我必须NSLocationWhenInUsageDescription在我的plist中实现并且也调用locationManager.requestWhenInUseAuthorization()但没有任何反应,我仍然在控制台中得到错误.我究竟做错了什么?
知道我为什么会收到这个错误:
Warning: Missing argument 1 for person::__construct(), called in /home/fishbein/public_html/dev/OOP/index.php on line 5 and defined in /home/fishbein/public_html/dev/OOP/class_lib.php on line 6
Warning: Missing argument 1 for person::__construct(), called in /home/fishbein/public_html/dev/OOP/index.php on line 6 and defined in /home/fishbein/public_html/dev/OOP/class_lib.php on line 6
Run Code Online (Sandbox Code Playgroud)
使用此代码:
<?
class person {
var $name;
function __construct($persons_name) {
$this->name = $persons_name;
}
function set_name($new_name) {
$this->name = $new_name;
}
function get_name() {
return $this->name;
}
}
?>
Run Code Online (Sandbox Code Playgroud)
我也在我的索引文件中使用它:
$tyler = new person("Tyler");
Run Code Online (Sandbox Code Playgroud)