I want to create a pin wheel(Like msnbc apps). Please see the below image. How do i create a pin wheel. Is there any sample code or tutorials available?.please guide me to how to achieve this?.
Sample Image http://www.freeimagehosting.net/uploads/e11f35e522.png
Thanks.
If you only need basic images, you can create it then load it in a UIImageView like so: (assuming you defined and init it)
imageView.image = [UIImage imageNamed:#"YOUR-Image-File.png"];
If you want them to rotate, make sure the centre of each image is the point where you want to rotate from.
This may not be the best method if you are looking for special effect, but it should work for a basic pin wheel.
Related
I tried to use MPFoldTransition for my UIView animation. But I want it like flipboard. That is, it should be animated as per the user touch.
Please help me that how can I achieve it. Also, is there any other library for UIView animation like flipboard.
If you want to use a library for this flip, MPFlipViewController uses MPFoldTransition and works with a pan gesture.
Also, take a look at https://github.com/ITechRoof/ITRFlipper
If you want to build this yourself and have a true flip like Flipboard (where it flips in the middle, with appropriate shadows), taking a snapshot of the view and using a simple matrix transform can do the trick. I'm not going to go into all the details as I could talk for hours about animation timing and shadows.
I've been looking for documentation on how to use the UIVisualEffectView with Objective-C in iOS8.
I've seen some code examples but would appreciate the steps to use the actual view in the Object Library. This is what I tried, which had no effect:
Create a new storyboard scene
Add a UIVisualEffectView
Add a UIImageView
Add a picture to the UIImageView
I want to have a blurred picture as the background for my scenes. Can someone point me to a tutorial or provide instructions?
Thanks
I have implemented a demo which demonstrates using UIVisualEffectView with vibrancy and also with vibrancy & blur. It uses a little bit different way of implementing via storyboard so look at https://github.com/Vaberer/BlurTransition.
How to get CATransform3D from Projection and ModelView matrices
I have browse this question before,the url;but it wasn't absolutely precise; I want to know why it’s not precise;
I find that the rotate by x--axis and y--axis is opposite(I can't post image);the Trapezoidal(when rotate the calayer , it's like a Trapezoidal) is opposite,dose calayer rotate is not like opengl?but it's right when rotate by z--axis.
I want get the Angle and then rotate it twice opposite;how to get Angle by the opengl matrices?
I want play movie by QCAR; I can get opengl matrices,and I want to use UIView to playe movie and other(Familiar with the UIView),and make UIview like Texture.
I just post a example on QCAR forum, you can check the detail here
The idea is simple.
1.I don't use avassetreader to read the video pixel, instead I use AVPlayer and AVPlayerLayer which can play remote video file.
2.I need to convert opengl modelview matrix to CATransform3D so the AVPlayerLayer will attach on the trackable image.Thanks for Hammer on stackoverflow, he shared an example about how to make this.
3.I tried to render camera background use opengl and AVPlayerLayer at same time, but the performace is not good enough, so I use another calayer to render the camera background. There is a bug in 1.5.8 when getting camera frame, thank for andersfrank the problem was solved here.
I put my code on pastebin:
http://pastebin.com/kmeVZ7jy
There are still some problem need to solve, but I think this is a right approach.
PS. For question 3 in my original post, you can fix it by set
cameraLayer.contentsGravity = kCAGravityResizeAspectFill;
This will fix the problem that the aspect ratio of the camera image is different with the iphone screen's.
Update
All the problem are solved, please check my original post on vuforia and pastebin.
I have built so far an application that allows the user to drag and drop images onto a NSImageView. However, I want to be able to move these images by simply clicking on any image and hold down the mouse button to move it's location.
How can I manipulate NSImageView to translate/scale after setting the images down? Is that possible? I've read about the NSAffineTransform, but it seems like that is moving the images before creating the image itself. I already have the images on the canvas, and simply want to click and hold the image and move it with my mouse. Please help anyone!
There are two sides to this.
NSImage is the model object, which you might want to display in different ways, save to disk/archive, etc. If you want to actually change the model (scaling, rotating, etc.), implying a permanent change, then you are going to probably want to look at NSAffineTransform, Quartz drawing, etc.
But you probably didn't mean that. Instead you probably are interested in NSImageView, which is a view object, displaying the contents of the NSImage model object using whatever display attributes are desired. If you only want to change how an image is displayed, not what the actual bytes in the image are, then you are going to manipulate the NSImageView at run-time. You can use NSAffineTransform here as well, but it's somewhat uncommon (and usually unnecessary).
The key thing to note that is the NSImageView inherits from NSView, so you have all its power at your disposal. Take a look at certain methods, such as:
-setFrameSize: - useful for changing the view size, and thus the image display scale
-setFrameOrigin: - useful for changing the view position, and thus the apparent image position
Note again that these have nothing to do with images per se, and apply to all Cocoa views. You may want to take a look at a book like Cocoa Programming for Mac OS X to get you past the basics. (You can then do more interesting things, like rotation, animation, etc.)
Is it possible to draw some noise on top of a rect I filled using NSRectFill? I need to make my app that draws a custom title bar look wonderful on 10.7 before release, and to make it look a little more like iTunes. I would love if this is possible using no images, but if I have to include a PNG or something as a mask, I'd be fine with that.
Thanks!
You can either use drawing logic (drawing a lot of small rects, lines or other polygons), or use NSImage's drawing methods, like for instance: drawInRect:fromRect:operation:fraction: