Title6

Title6

MKPointAnnotation 不是UI
只是資料物件存放大頭針的相關資料


        CLLocationCoordinate2D annotationCoodinate =
        currentLocation.coordinate;
        annotationCoodinate.latitude += 0.0005;
        annotationCoodinate.longitude += 0.0005;

        MKPointAnnotation * annotation =[MKPointAnnotation new];
        //存經緯度座標 標題 副標題
        annotation.coordinate=annotationCoodinate;
        annotation.title = @"KFC";
        annotation.subtitle=@"真好吃��";
        //添加到MapView
        [_mainMapView addAnnotation:annotation];

protocol不見得搭配delegate來使用
protocol的定義是一堆方法或者是property的集合
protocol定義的是一種溝通方式

delegate基於protocol 存在

Comments

Popular posts from this blog

MEGA 暫存檔案刪除

IOS GCD多執行緒

利用CMD指令強制刪除