¡@

Home 

2014/10/15 ¤U¤È 10:03:30

iphone Programming Glossary: addsublayer

How can I add overlay text on a video, then re-encode it?

http://stackoverflow.com/questions/10190333/how-can-i-add-overlay-text-on-a-video-then-re-encode-it

0 0 videoSize.width videoSize.height videoLayer.frame CGRectMake 0 0 videoSize.width videoSize.height parentLayer addSublayer videoLayer parentLayer addSublayer aLayer CATextLayer titleLayer CATextLayer layer titleLayer.string @ Text goes here titleLayer.font.. videoLayer.frame CGRectMake 0 0 videoSize.width videoSize.height parentLayer addSublayer videoLayer parentLayer addSublayer aLayer CATextLayer titleLayer CATextLayer layer titleLayer.string @ Text goes here titleLayer.font CFBridgingRetain @ Helvetica.. CGRectMake 0 0 videoSize.width videoSize.height 6 You may need to adjust this for proper display parentLayer addSublayer titleLayer ONLY IF WE ADDED TEXT AVMutableVideoComposition videoComp AVMutableVideoComposition videoComposition videoComp.renderSize..

Animating the drawing of a line

http://stackoverflow.com/questions/10603391/animating-the-drawing-of-a-line

2 100.0 260 CGPathCloseSubpath path self.rootLayer CALayer layer rootLayer.frame self.bounds self.layer addSublayer rootLayer self.lineLayer CAShapeLayer layer lineLayer setPath path lineLayer setFillColor UIColor redColor .CGColor lineLayer.. UIColor blueColor .CGColor lineLayer setLineWidth 1.5 lineLayer setFillRule kCAFillRuleNonZero rootLayer addSublayer lineLayer self performSelector @selector startTotalLine withObject nil afterDelay 1.5 void startTotalLine CABasicAnimation..

Drag UIView around Shape Comprised of CGMutablePaths

http://stackoverflow.com/questions/13664615/drag-uiview-around-shape-comprised-of-cgmutablepaths

UIColor blackColor .CGColor pathLayer_.lineCap kCALineCapButt pathLayer_.lineJoin kCALineJoinRound self.view.layer addSublayer pathLayer_ Note that we haven't set the path layer's path yet It's too soon to know the path at this time because my view.. circleLayer.lineWidth .CGPath circleLayer.frame rect handleView_ UIView alloc initWithFrame rect handleView_.layer addSublayer circleLayer self.view addSubview handleView_ Again it's too soon to know exactly where we'll need to put the handle on screen...

composite colors: CALayer and blend mode on iPhone

http://stackoverflow.com/questions/1658751/composite-colors-calayer-and-blend-mode-on-iphone

Upload live streaming video from iPhone like Ustream or Qik

http://stackoverflow.com/questions/1960782/upload-live-streaming-video-from-iphone-like-ustream-or-qik

previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession previewLayer.frame view.bounds view.layer addSublayer previewLayer go captureSession startRunning Then the output device's delegate here self has to implement the callback void..

Bold & Non-Bold Text In A Single UILabel?

http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel

UIScreen mainScreen scale looks nice in retina displays too _textLayer.alignmentMode kCAAlignmentCenter layer addSublayer _textLayer Create the attributes for the attributed string CGFloat fontSize 13 UIFont boldFont UIFont boldSystemFontOfSize..

How to properly release an AVCaptureSession

http://stackoverflow.com/questions/3741121/how-to-properly-release-an-avcapturesession

previewLayer AVCaptureVideoPreviewLayer layerWithSession session retain previewLayer.frame view.bounds view.layer addSublayer previewLayer session startRunning Cleanup previewLayer removeFromSuperlayer previewLayer release session stopRunning session..

iPhone SDK 4 AVFoundation - How to use captureStillImageAsynchronouslyFromConnection correctly?

http://stackoverflow.com/questions/3847140/iphone-sdk-4-avfoundation-how-to-use-capturestillimageasynchronouslyfromconnec

CGRectMake 0.0 0.0 480.0 320.0 self.prevLayer.videoGravity AVLayerVideoGravityResizeAspectFill self.view.layer addSublayer self.prevLayer Setup the default file outputs AVCaptureStillImageOutput _stillImageOutput AVCaptureStillImageOutput alloc..

iPad: Animate UILabels color changing

http://stackoverflow.com/questions/3944416/ipad-animate-uilabels-color-changing

UIColor purpleColor .CGColor textLayer setFontSize 30 textLayer setFrame CGRectMake 20 200 300 40 self.view layer addSublayer textLayer CABasicAnimation colorAnimation CABasicAnimation animationWithKeyPath @ foregroundColor colorAnimation.duration..

AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection?

http://stackoverflow.com/questions/4401232/avfoundation-how-to-turn-off-the-shutter-sound-when-capturestillimageasynchrono

Uploading live streaming video from iPhone [duplicate]

http://stackoverflow.com/questions/5062266/uploading-live-streaming-video-from-iphone

previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession previewLayer.frame view.bounds view.layer addSublayer previewLayer go captureSession startRunning Then the output device's delegate here self has to implement the callback void..

Playing many different videos on iphone using AVPlayer

http://stackoverflow.com/questions/6258573/playing-many-different-videos-on-iphone-using-avplayer

release NSLog @ Playing item @ contentURL playerLayer AVPlayerLayer playerLayerWithPlayer player movieContainer.layer addSublayer playerLayer playerLayer.frame movieContainer.layer.bounds playerLayer.videoGravity AVLayerVideoGravityResizeAspect self.seeker.alpha..

CALayer: add a border only at one side

http://stackoverflow.com/questions/7022656/calayer-add-a-border-only-at-one-side

iPhone Core Animation - Drawing a Circle

http://stackoverflow.com/questions/7991086/iphone-core-animation-drawing-a-circle

.CGColor circle.strokeColor UIColor blackColor .CGColor circle.lineWidth 5 Add to parent layer self.view.layer addSublayer circle Configure animation CABasicAnimation drawAnimation CABasicAnimation animationWithKeyPath @ strokeEnd drawAnimation.duration..

AVCaptureSession specify resolution and quality of captured images obj-c iphone app

http://stackoverflow.com/questions/9312832/avcapturesession-specify-resolution-and-quality-of-captured-images-obj-c-iphone

you want the preview layer to fill the view. previewLayer setBackgroundColor UIColor grayColor CGColor self.view.layer addSublayer previewLayer aView.layer addSublayer previewLayer and output methods Delegate routine that is called when a sample buffer.. view. previewLayer setBackgroundColor UIColor grayColor CGColor self.view.layer addSublayer previewLayer aView.layer addSublayer previewLayer and output methods Delegate routine that is called when a sample buffer was written void captureOutput AVCaptureOutput..