Re: When I rotate the MKMapView with transform, setCenter not working.

2014-10-31 Thread sonofsky2...@gmail.com
Hi, 
I have solved this problem.
Do not change the frame of map view when it’s transform does not equal to 
CGAffineTransformIdentity.


Best Regards,
Sunny Lee




> 在 2014年10月31日,上午12:54,sonofsky2...@gmail.com 写道:
> 
> Hi all,
> 
> I rotate the MKMapView with setting the rotation transform. When I use 
> setCenter method to change the center coordinate of the map, the location of 
> this coordinate not in the center. Does anyone know what happened, and how to 
> solve this problem? Below is the code snipt.
> 
> 
> - (void)viewDidLoad {
> [super viewDidLoad];
> // Do any additional setup after loading the view, typically from a nib.
> static CLLocationCoordinate2D aircraftCoordinate = {22.531474, 
> 113.943516};
> CGFloat width = self.view.bounds.size.width;
> CGFloat height = self.view.bounds.size.height;
>CGFloat newSize = sqrt(width* width + height * height);
> UIView *tmpView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, width, 
> height)];
> [self.view insertSubview:tmpView atIndex:0];
> self.containorView = tmpView;
> 
> MKMapView *tmpMapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, 
> newSize, newSize)];
> 
> [self.containorView addSubview:tmpMapView];
> self.mapView = tmpMapView;
> [tmpMapView setCenter:self.containorView.center];
> 
> self.annotation = [[DJITestAnnotation alloc] init];
> _annotation.coordinate =  aircraftCoordinate;
> [self.mapView addAnnotation:self.annotation];
> self.mapView.delegate = self;
> 
> [self.mapView setTransform:CGAffineTransformMakeRotation(90 * M_PI_4 / 
> 180)];
> 
> }
> 
> - (IBAction)location:(id)sender {
> 
> self.mapView.camera.centerCoordinate = _annotation.coordinate;
> }
> 
> 
> Best Regards,
> Sunny Lee
> 
> 
> 
> 
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

When I rotate the MKMapView with transform, setCenter not working.

2014-10-30 Thread sonofsky2...@gmail.com
Hi all,

I rotate the MKMapView with setting the rotation transform. When I use 
setCenter method to change the center coordinate of the map, the location of 
this coordinate not in the center. Does anyone know what happened, and how to 
solve this problem? Below is the code snipt.


- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
static CLLocationCoordinate2D aircraftCoordinate = {22.531474, 113.943516};
CGFloat width = self.view.bounds.size.width;
CGFloat height = self.view.bounds.size.height;
   CGFloat newSize = sqrt(width* width + height * height);
UIView *tmpView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, width, 
height)];
[self.view insertSubview:tmpView atIndex:0];
self.containorView = tmpView;

MKMapView *tmpMapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, 
newSize, newSize)];

[self.containorView addSubview:tmpMapView];
self.mapView = tmpMapView;
[tmpMapView setCenter:self.containorView.center];

self.annotation = [[DJITestAnnotation alloc] init];
_annotation.coordinate =  aircraftCoordinate;
[self.mapView addAnnotation:self.annotation];
self.mapView.delegate = self;

[self.mapView setTransform:CGAffineTransformMakeRotation(90 * M_PI_4 / 
180)];

}

- (IBAction)location:(id)sender {

self.mapView.camera.centerCoordinate = _annotation.coordinate;
}


Best Regards,
Sunny Lee




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

In Av Foundation, animationTool does not work, when using customVideoCompositor

2014-07-23 Thread sonofsky2...@gmail.com
Hi all,

I use AV Foundation for video cutting. I make a custom video compositor to 
compose the video. I create some CATextLayer for showing text and I add these 
layers to videoComposition’s animation tool.
But the text not show in the exported video. Any one can give me some advices 
about how to add text on the video with a custom video compositor?

Best Regards,
Sunny Lee


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Can an iPhone5 be a USB Host device?

2014-06-04 Thread sonofsky2...@gmail.com
Hi all,

Does anyone know weather an iPhone5 can be a USB Host Device? I have a USB 
Slave  device, I want to connect this device to iPhone5. I will apply a MFI 
Licensees. 

Best regards,
Sunny
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com