Cocoa: Custom control not limited to window frame - how to start? -
I want to create a custom control that will work like this: You have a type of NSBeton with an image. You click the button and a large square with the grid of the photos appear. You click on one of the photos and it is set as a new image for the button. (Square Guyshers)
Now, if I want this window frame not limited to frame, how to draw this big square with pictures? I mean, if the button was close to window border then the square is going to be partially out of the window. I would like to add some shade to the square and animation to open / close.
An important point: I want to attract not just one class but any other normal shape (cycle)!
It is really not a drawing question as a question of a common question, it is important to make the difference .
I will describe this in the context of rectangles to give you general idea *. You should make sure that you and cocoa understand. Without this vital mandatory knowledge, you will remain dead in water.
Setting the image of NSBTTan is easy, so I will leave it to you. However, the action of your button will ask some controllers to show "image picker" for the given button. Your image picker will be in some sort of image list. The image picker can be the IKImageBrowserView (you have to enable the image kit in the interface builder for this control), which gives you an Iphoto-like grid of images (without / without titles, different border types etc.).
The details of the operation of this controller and how it creates the window, manages the selection, and sets the image of the image very wide , so if you want to , You will need to create a different question for each problem otherwise this answer will have to be an instruction manual for your app to write for you.
* Your problem is a bit more difficult because you have different size "Popup Window" ... you have to make sure your available photos fit smoothly in size So none of them are cutting, armed with the basic knowledge of the visual geometry, I will leave it as a practice, an indication: you can use transparent window without any restrictions Attracts the.
Comments
Post a Comment