Custom UITableViewCell + Objective-C - objective-c

While in editing mode, to the right of the UITableViewCell there is an icon of 3 lines with a hand holding function that can be dragged and dropped by UITableViewCell and I'm having trouble changing the image for that icon or changing the colors for that icon.
Please help me, thank you!

If I understand right, 3 dots to resize the UITableViewCell.
If you add any image view to your cell class, you can change the image by selecting the image view & in the attribute inspector (4th option) set the image name.
Your image should be added into your assets.

Related

xcode6 storyboard uibutton image title laybout

how can i set button's image and title correctly position.
now the storyboard preview like:
I add title and image to the button and set title and image edgeinset to get picture layout. but the button'size is changed with the phone size. so i can't set it in storyboard properly for all size.
i want to to know is there a way to deal with this situation?
thanks!
see the tutorial link below ,
http://www.appcoda.com/introduction-auto-layout/
it's show how to fix constant heigh and width of view.
you see clear in image how it done.

Custom UICollectionViewCell Subview Layout Issue

I have a custom UICollectionViewCell class that sets the background view of the cell to a downloaded image and also a UILabel added to it that sits neatly at the bottom of the cell and is slightly transparent (this label is the title of the image). It looks great in portrait but when I rotate my device to landscape the UILabel stays in its position while the custom cell resizes itself to better fit the screen. I have my UILabel fully constrained to the cell so I don't know why it isn't resizing to always fit the width of the cell whether the device is in portrait/landscape.
I've attached these pictures below to better illustrate what exactly is happening:
I figured it out - for anyone who is also wondering the same thing, this is what I did:
I overrode the layoutSubviews method in my custom UICollectionViewCell class and forced my UILabel to stick to width and bottom of the cell.
It was weird because before I upgraded to xCode 6 and iOS 8 this was working perfectly without the need of this solution (the constraints within the storyboard worked), but now I had to use this approach.
Cheers!

How to put background for UITableViewController

I wanna do something like THIS in my ipad application, what is the best way to do the followings:
The shadow under the upper bar.
The padding for the papers (top, left, right & bottom)
The background (as a notepad) : please think about the cells: they must still scrolled inside the paper and cropped before reaching to the paper bottom edge.
I'm looking for the optimal solution that avoids overriding as much as possible.
EDIT :
I tried to use UIViewController (with UITableVIew and has the delegate methods) inside UISplitViewController, And I tried adding UIImageView at the top of the table but this view will scroll with the cells and it'll hide when I scroll down. I tried to use viewForHeaderInSection function also for upper shadow (under the bar) but what about the papers bottom edge (what if I put one image including the shadow and the papers bottom edge and has the padding as a background for the UITableView or UITableViewController, and change this image when rotate to the portrait orientation? is this a good and possible solution?)
My guess:
Create the background in an image editing app
Cut 4 images, for header, footer, left and right sides
Create a UIViewController with 4 UIVIews and add the correct images as background
In the middle of all 4 add a UITableView
This way the images won't move and if you position the UIViews with the background properly, your TableView will scroll inside the notebook (assuming you are trying to create a notebook)
If you app is iOS 6.0 only, autolayout will be a great help. Check apple developer video on it to learn how to use this feature: WWDC 2012 Session 232 - Auto Layout by Example
One easy way to do this is from the xib:
1. In xib create image .On image view you can put background whatever you want as a image.
2. create table view above the image view and set table view background color as a clear color.
This will do it.

UITable View is filling the entire view

I am working on an iphone application on XCode 4.3 using storyboard.
I have created a view and I need it to be divided in two parts. the top part will contain a UIImageView and the bottom part a UItableView.
So I added both to the view using the storyboard interface builder, and set the sizes and positions of the UIImageView and the UITableView.
However when I run the application, the UITableView will take the entire view (it is being scaled to fill the view). I need it just to stay at the width/height I specified in the IB.
Why does the UITableView take the entire view? and how can I make a view with a UITableView be a small part of the view and not fill it?
I hope I was clear
Thanks a lot for any help
edit:
Screenshot of the storyboard section
the top part has a UIImageView and a "Share" Button
and the bottom part a UITableView
The UITableView is taking the entire view and hidding the rest
Another screenshot requested
I am not using storyboard here, just a xib, but it should matter. This is how you should set it up:
Autoresizing for UITableView:
Autoresizing for UIImageView:
Notice the fixed top margin for image view, fixed bottom margin for tableview, and flexible height for both. This will ensure tableview always sticks to the bottom and expands upwards proportionally, and vice versa for image view.
You would want to play around with this settings of your UITableView
I believe the setting is off making it resize. But I might be wrong.
Note: this is a screenshot of my UITableView inside a view controller and it is NOT filling my screen. It may have a different setting in your case. So play around with the values in there.

xcode/iOS: UITextField overlaid onto UITableViewCell with same frame does not match

To allow high-performance editing of UITableView cells I maintain a single UITextField which is displayed/hidden as needed. I've extended UITableView so that double-tapping a cell enters text edit mode, at which stage the text field is added as a subview to the tapped UITableViewCell and becomes the first responder. The cell textLabel is purposefully hidden at this point.
My issue is: I set the same frame and same font for my UITableViewCell and the UITextField, yet the two do not exactly overlap. I have produced an image illustrating this behaviour: the left side shows on top the UITableViewCell textLabel, below this is the UITextField overlaid with cell textLabel hidden, and on the right are both made visible.
I'm not keen on "fudge factor" value fixes, so can anyone tell me what's missing?
I am running the app under iOS 4.2 in the xcode iPad simulator.
Many thanks!
Textfield might just align its content differently. Give the textfid a border to see if it really has the same size as your cell's content view (are you adding to that? Or to the cell's view?)
If the textfield and the cell match, I don't see a problem using a fudge factor.