Hi ,
I have a button creator.
You can choose the alpha , saturation etc.
You can also enter a name/text in a textfield and it will display it on a label (on the button).
Actually you could create a custom button with custom text on it.
How do I have to do that you can save the button layer + the label layer together ?
Thanks very much !
if you need to show the image only on your app, you can just save the uibutton frame together the image (so that you can re-add it every time you show the image), if you need to create an image that include the button, you can get a screenshot, but you have only a low-res image.
if you need to show the image only on your app, you can just save the uibutton frame together the image (so that you can re-add it every time you show the image), if you need to create an image that include the button, you can get a screenshot, but you have only a low-res image.
Thanks !
But I need to save the button layer with the label layer together.
The screenshot will have all my window , but the button is only a part of it , so you will see all the other things, and it is low-res as you said
Any idea what's the code for to save only the button layer (wich I know) , but the code for the button layer with the label layer , do you know it (I don't know) ?
I thinked initially that you're searching a way to save your image + a button on it.
Now i understand that you need to save only a button + a label. But you need to do that in an image? or you can just save button frame and label text and then re-show it?
I thinked initially that you're searching a way to save your image + a button on it.
Now i understand that you need to save only a button + a label. But you need to do that in an image? or you can just save button frame and label text and then re-show it?
I don't really understand what you mean. But let's say like that :
It's a button maker. You choose the button text , alpha , saturation etc.
After you made the button you sould save him to you image. When I do that it's saves only the button layer , but not the label layer.
I want to save the button frame + the label text together with no background (so in alpha).
I have the code for to save the button., but i don't know the code for to save the label in the button image.
Do you want that I let see the code for to save the button layer only ?
_button is the button to be saved , it saves only the _button layer.
I have also a UIlabel called label. I want this to be saved with the button frame together
Thanks !
Thanks but what do you mean with add your button and label on a UIView , how do I have to do that.
I don't reallly understand what you mean with this Thankyou
Quote:
Originally Posted by dany_dev
add your button and label on a uiview and then change that line
where yourView is a UIView that you allocated\initialized with a certain frame and added as subview of your self.view (where self represent your viewcontroller).
you haven't added it as subview of your view of your viewController (self.view), so you will never see that.
Moreover you are using property not in a good manner (read it), and you should not use view as name of your istance variable since that "view" is already the name of the view of the ViewController (self.view)
Thanks , when I'm fitting the CGRect , the button is always moving with myView. So I take an image of that and the button is not inside because it's moving with the myView
But still thanks for the code !
Thanks , when I'm fitting the CGRect , the button is always moving with myView. So I take an image of that and the button is not inside because it's moving with the myView
But still thanks for the code !
i don't understand what you say .
Using the code posted, when you do a screen, what you see inside it? uibutton + label or whatever?
Using the code posted, when you do a screen, what you see inside it? uibutton + label or whatever?
I typed your code and I when I let the cgrect on all the screen , I cannot tap another rounded rect button with IBaction. But when I reduce the cgrect of myView , I can tap the other rounded rect button.
But the problem is : when i reduce the cgrect , the _button moves from his original place , wich is why i cannot take a picture of the button
After reducing I see the label + _button on another place , but my originals things like my other button with UIButton (not related to myView) doens't change place
Thanks for sharing answers. I was searching for this answers from many times and posted this thread in many forums but i was not able to find out the answers. I think now it will help me out in my problems.