How to draw bullet in table views cell? - iphone

I want to draw bullet in my table views cell.
I found one method for getting bullet is :
lbl.text = #"\u2022 Hey its bullet";
But it is giving small bullet.
So is there any other way to get bullet in my apps?

If the bullet is small it's because that the standard size for the font-family/font-size you are using.
You'd have to set the bullet font to a different font family or font size to increase it's size.
I assume you're using a default cell view. You could create a custom cell view and manually place a bullet in interface builder with a UILabel after it.

You could try adding an image to the imageView property of your tableviewcell. Something like this:
myCell.imageView.image = [UIImage imageNamed:#"myBulletPoint.png"];
You'd probably want to cache the image, but this should get you going.

Related

iPhone - How to partially hide the subview?

I am developing one sample application using gestures, where i can pinch, pan and rotate. I have one main image view width and height is 300 and origin x is 0 and y is 70. This imageview I am using from interface builder. After this i am adding one label programmatically on the middle of the imageView. After adding the label I can able to pan, pinch and rotate the label on the view. Now the actual requirement is when i drag the label outside the imageview I should be display the partial label, for example (My label text is ABCDXYZ). As soon as I drag the Z outside the Z should be invisible, other part ABCDXY should be visible. More clear is drag the one view inside other view. How can i achieve this.
What you have to do is create a UIView. On that add the UIImageView like
[View addSubView:ImageView];
then add the UIlabel on the UIImageView like
[ImageView addSubView:Label];
Now set the clipsToBounds = YES. I think now your issue of the partial label would be solved as the label would move within the UIView and as soon as it goes out it would be shown partially. Any doubt please tell . Thanx :)
Its really tricky to give handheld solution for this, instead it could be a suggestion. I assuming that your UILabel text is dynamic, there's some scenarios you can follow to achieve this.
1) When you touch your label inside UIImageView you shoud get the exact coordinates of it.
2) Get the position where user touch on UILabel.
3) Compare the touch coordinates with total coordinates of UILabel.
4) Assume which character did touched. (You should make test of it, also text size may also matters).
5) When user drag that particular character (say Z) you need to remove that from UILabel text.
That's all. You're done.

Can a UILabel be part of a created image?

I have a project where I let the user draw on the screen of the iPhone (signature box). It works great... prints to a specific label printer (Zebra gx420d). My question is as follows: Can I have a UILabel field be part of the "Image" that is drawn? It is visible on screen, but doesn't print.
Any help would be appreciated!
Just make sure the label and your custom view subclass that draws the signature are both subviews of a common superview. Then invoke print on the common superview, and both of them (actually all subviews) will be part of the printed image.
You need to draw the text into an image graphics context.
This question may help: How do I use the NSString draw functionality to create a UIImage from text

Resizing UIImageview with a UITextview using UIGuesture

I'm new in Iphone. I have an UITextView inside a UIImageView . Now I need to dynamically resize the UIImageView so that its textview also change its size dynamically. Moreover I can move this UIImageView with UITextView around the screen. If any one knows this using UIGuesture please help me.
Any help would be appreciated
If you are looking at resizing the UIImageView object, look at the UIPinchGestureRecognizer. It will have a property called scale that you can use to change its size.
As for the UITextView object that is the subview, you can look at autoresizingMask property inherited from UIView. Set it appropriately so that the text view scales in response to its super view.
For moving the image view, you can use the UIPanGestureRecognizer. You can get the translation using translationInView:. Use this to modify the center of the image view object. This should move the image view as you drag your finger around.
I hope you've gone through the guide. Let us know if you face problems implementing this and put some code so that we can guide you in the right direction.

UIImage inside table view cell

Inside my table view for each cell I have an image along with some text and other stuff. When I select a cell I want the image also to be covered with blue overlay. Right now all other stuff excluding image is getting selected and a blue overlay covers the cell.
How to achieve this?
You won't be able to have that blue overlay to cover your image. The blue gradient is the backgroundView of the cell, whereas your UIImage is either drawn inside the contentView or added to it as a subview.
A possible workaround would be to add a CALayer on top of the whole cell that would mimic the default blue background.
It seems like there should be a way to do this without modifying your image, but all I can find so far is to specify a new image when the cell is selected. UIImageView has a property for both image and highlightedImage, so it would seem you need to provide your own image to use when the cell is selected, so you would need to set cell.imageView.image and cell.imageView.highlightedImage.
Sam's workaround would be a good approach, also. Especially if you don't want to provide your own image

iOS: How to display multiple images dynamiclly in imageview?

Hi I am new to iPhone.
What I need is, have to display only one image in one case, two images in another case like wise and for that I am using a UIImageview with IBOutlet.
How can I display multiple images in single imageview?
Please help me post some code.
Thank you.
An UIImageView can only display one image at a time. You will either have to use several UIImageViews or compose your images into one file before displaying it.
I think you should subviews ot type UIImageView to your main UIImageView.
The "hard" task will be to compute the boundaries of each subview, according to the prefered layout. Use the image property of UIImageView to set the image for each subview (don't worry about resizing, UIImageView will do the work for you)