Cropping image into popup? - objective-c

How to crop an image coming from server into popup? I have image coming from web service and showing it into a popup on a click on a table. I want to add cropping functionality into it. How can I do it??

There are a number of open source image cropping libraries on cocoacontrols.com Here's one that replicates Apple's crop image feature. You can then display the editing view controller in a popover when the user selects the row.

Related

Expo Image editor from ImagePicker API

Exponents ImagePicker API lets you pick an image from your library. After picking an image it opens the image in an image editor that lets you edit the image. Is there any way to skip the image picking part and directly go to the editor screen?
Like I give in an image URI and it opens that image in the image editor screen of expo.
Set allowsEditing={false}. See here for details.
allowsEditing (boolean) -- Whether to show a UI to edit the
image/video after it is picked. Images: On Android the user can crop
and rotate the image and on iOS simply crop it. Videos: On iOS user
can trim the video. Defaults to false.

codename one how to place component on an image viewer that capture camera?

I have a GUI Builder created form in codename one, how can i open the camera in a resizable view at the show() of the form and place container like text area or anything else on it?
I saw the camera demo but i don't understand it very well because on the simulator it open a file picker.
My purpose is to create a form with a camera resizable capture when you have two labels and you can also write or paint on your photo used in background, I do this only for hobby and fun, i do what i can, Any advice is well accepted, thank you for the attenction
You can now place a component on top of a camera view with a new cn1lib: https://github.com/codenameone/CameraKitCodenameOne
Original answer below:
I'm assuming you mean overlay on a live camera view. While this is possible it's not supported at this time in the Java API layer.
If you mean grabbing a photo and setting it as a background for the form for overlay you can create an image with the result of the Capture API and use setBgImage() to set that image to the background of a component or form.

Share image with text in iOS

I am making an photo editing app in which I have applied some photo editing effect on selected image and then save image. After that when user press on share button I select image form photo gallery and share it on facebook, whatsapp, wechat, googleplus, instagram etc. Now problem is that I want share image with message.
If you want to add text to an image then load the image in a UIImageView then add a UILabel as a subview. Then render the views into an UIImage. like this
Then to share the image use UIActivityViewController like this

Yosemite Toolbar Style

How do I get the new toolbar item style of OSX Yosemite?
I created a standard toolbar, but the buttons don't have that button-like look. Do I need to drag actual buttons to the toolbar to get this look?
What I have:
What I want (that round bezel and white background):
There are two types of items in toolbars, image items and view items. It looks like you have an image item. You seem to want a view item where the view is an NSButton configured as a round textured button. So, yes, you should drag actual buttons to the toolbar.
I would not attempt to control the button background. You should use the button as-is to get the default system appearance. Apple recommends using a PDF template image (all black with the alpha channel used to make the image). The button itself would not have a title/label. Rather that would be on the containing toolbar item.
It looks like you may have applied an internal blue "glow" or highlight to your image. Generally, you should not do that. Let the frameworks apply appropriate effects to the template image automatically based on the button state and shows-state-by mode.
Toolbars in the Human Interface Guidelines
Controls which are appropriate to use in the window frame (including the toolbar)
Designing images for toolbar buttons
Works just fine for my Cocoa app under Yosemite -
are you actually setting the template property for your icon images..?
From the NSImage docs:
The 'template' property is metadata that allows clients to be smarter
about image processing. An image should be marked as a template if it
is basic glpyh-like black and white art that is intended to be
processed into derived images for use on screen.

How to Add an image in an alertView?

I have three images
The first image is a background for alert view
The second image should inside the first image
The third image is an "Ok" button image (When I click it, I should go to the next page)
I would like to add these to a UIAlertView
Would appreciate any guidance.
Prior to iOS7:
You can add image to UIAlertView using
[yourAlertView addSubview:<yourImageView>;
In iOS7+ you can not do this way.
Please see this code available in github that adds image to UIAlertView.
I have done with following custom control. It might be what you are looking for :
https://github.com/wimagguc/ios-custom-alertview