Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TableViews

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa
Mac Cocoa  
Author Message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sat May 02, 2009 1:43 pm    Post subject: TableViews Reply with quote

iphonedevsdk.com - UITableView with lots of cells (+1000)

"Curious does anyone have any good ideas/best practices for how to use
UITableViews with lots and lots of cells?"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3035
Location: Europe

PostPosted: Sun May 10, 2009 6:14 pm    Post subject: Reply with quote

SO - What are your favourite UITableView / UITableViewCell tricks?

"To ensure good performance scrolling, it's important to avoid transparency
in any element if possible - so if you are creating custom cells make them all
opaque and set the backgrounds correctly."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Jun 01, 2009 12:22 am    Post subject: Reply with quote

so - More than 1 rightBarButtonItem on navigation bar

"My suggestion would be to not implement the Add functionality as a button
in the navigation bar. I assume that you're dealing with a table view of items
below, so one way of handling this user interaction is to display an "Add new
item" option as the last entry in your table view."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Tue Jun 02, 2009 1:35 pm    Post subject: Reply with quote

MF - Resizing UITableView When In Landscape

"You need to set the autoResize flag of the tableview to flexible height and
flexible width. Then it will resize whenever its parent view resizes."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Sep 14, 2009 12:07 am    Post subject: Reply with quote

MF - Image Persistence In UITableViewCell

"Each time the animation occurs the tableview is reloaded. but sometimes
when the app is in state A and the tableview animates back onto the screen,
all of the cells with buttons that completely fit in the tableview are of the cor-
rect red color except for the last cell, which is only partially visible and most-
ly outside of the scroll area is green. however, the last cell's wrong color on-
ly lasts for a second, quickly switching to the correct color."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sun Sep 20, 2009 1:40 am    Post subject: Reply with quote

MF - Custom table cells

"... in that table cell I have a label on the bottom. I want to resize the whole
cell and the label if there is too much text to fit. Text is loaded from an NS-
Array. But I don't know how the resize the cell and the label so that the text
can fit."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sun Sep 20, 2009 2:27 pm    Post subject: Reply with quote

MF - Restoring state to a navigation controller with table views

"Take a look at one of Apple's apps (like Mail) that restores state across a
Navigation Controller. If you start your app on a leaf controller and you pop
back to a table view, the "selected" table cell de-selects, as if it was select-
ed to push you to the leaf in the first place."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Sep 21, 2009 12:51 am    Post subject: Reply with quote

iphonesdkarticles.com - Drill down table view tutorial

"Using a drill down table view we can display some primary level of items,
where a selected row will result in displaying a new table view with data
related to the item selected. The process is repeated until an item has no
sub level categories and it is then we display a detail view which is not a
UITableView."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Wed Nov 11, 2009 4:38 pm    Post subject: Reply with quote

MF - Table doesn't Scroll Programmatically

"I need on button clicking to scroll table programmatically. But the following
code does nothing..."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sat Apr 03, 2010 12:21 am    Post subject: Reply with quote

Michael Tyson - Easy rounded corners on UITableViewCell image view

"Here’s a relatively easy way to achieve rounded corners on the standard
image view in a UITableViewCell:

cell.imageView.layer.masksToBounds = YES;
cell.imageView.layer.cornerRadius = 5.0;

Set this up when you create the cell."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Fri Apr 23, 2010 11:47 pm    Post subject: Reply with quote

Jeff LaMarche - Table View Cells Redux

"It's really, really easy to forget that step, and the code works perfectly fine
if you do forget, you're just eating memory and getting poorer performance
than you should. Unless you profile your apps or test with very large data
sets, you could very well ship your app like this and not even realize it."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sat May 15, 2010 12:46 am    Post subject: Reply with quote

SO - Is there a way to fix the background image of a UITableView

"The problem im having is the background image is scrolling and doesn't
look good at the top and bottom of the screen where you see the image
being joined."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sun May 23, 2010 6:53 pm    Post subject: Reply with quote

MF - How to show a light reasonable cell selected image / color?

"If you want to customise the selected background colour it is possible, just
rather more involved than you might like (see the SELOC Tech Wiki app in
my signature for example: it uses UITableViews a lot with customised colo-
urs: my selected highlights are green)."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon May 24, 2010 11:31 pm    Post subject: Reply with quote

Jeff LaMarche - Downloading Images for a Table without Threads

"I've written a small iPhone app that downloads images from Deviant Art.
You just enter somebody's Deviant Art username into a text field and the
application will grab the the images in that person's gallery, download them
asynchronously, and display each one in the table once it's finished down-
loading."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sun Jul 18, 2010 9:52 pm    Post subject: Reply with quote

so - How to set a gradient UITableViewCell background?

"I would like to create a gradient UITableViewCell background like the de-
fault Clock app that comes on the iPhone. I am not exactly sure how to ac-
complish that."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Thu Aug 19, 2010 5:47 am    Post subject: Reply with quote

Detecting horizontal swipe in a UITableView
http://forums.macrumors.com/showthread.php?t=532573
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3035
Location: Europe

PostPosted: Sat Dec 18, 2010 8:48 pm    Post subject: Reply with quote

coneybeare.net - Proper alignment of UIImage and UILabel when
using UITableViewCellStyleSubtitle


"The only customization I did was change the detailTextLabel numberOf-
Lines to 2. So I loaded up my content and to my dismay, the cell is not in-
telligent enough to line up the labels horizontally across all cells. This really,
really bothers me."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Mon Oct 31, 2011 9:13 pm    Post subject: Reply with quote

Looks like -indexPathsForVisibleRows may return an array even when there
are no cells at all in the table, so this code is SIGABRT waiting to happen:

Code:
NSArray  *cells = [self.tableView indexPathsForVisibleRows];

if (cells)


It is better to do this:

Code:
NSArray  *cells = [self.tableView indexPathsForVisibleRows];

if (cells && [cells count])
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sun Mar 18, 2012 1:48 pm    Post subject: Reply with quote

bnr - Entering Editing Mode via swipe

"// The willBegin/didEnd methods are called whenever the 'editing' property
is automatically changed by the table (allowing insert/delete/move). This is
done by a swipe activating a single row"



bnr - Handling "swipe to delete" mode

"Turns out that we need to modify setEditing:animated: when we use a
navigationItem"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Thu Jan 10, 2013 9:09 pm    Post subject: Reply with quote

cocoanetics.com - Expanding/Collapsing TableView Sections

"The eye of the experienced developer sees two challenges contained
therein: 1) grafting a mechanism for collapsing and expanding onto
UITableView in a reusable way 2) making custom accessory views that
look like a rotated version of the disclosure indicator, pointing upwards
or downwards and also changing color when highlighted."


Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3035
Location: Europe

PostPosted: Tue Dec 24, 2013 4:22 pm    Post subject: Reply with quote

so - Change background of a grouped UITableView

"This usually works on every other UITableView, but not the one with groups,
is there something else I have to do? In IB I have the background color set
to a clear color, but that doesn't do much."

"A: You additionally need to disable the background view of tableView."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3035
Location: Europe

PostPosted: Tue Dec 24, 2013 10:20 pm    Post subject: Reply with quote

so - iOS 7 TableView like in Settings App on iPad

"I want to have a group UITableView with the style same like the iPad
Settings application Detail view for iOS 7. It is a tableView with rounded
corner. Please check the attachment for details."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3035
Location: Europe

PostPosted: Tue Dec 24, 2013 10:22 pm    Post subject: Reply with quote

so - IOS7 UITableView grouped like in Settings App

"There is a much simpler way to achieve this.

• Place your UITableView away from the sides. eg: using Autolayout you'd
have a leading and trailing space of 15px (or whatever you want). You're
now creating the 'indentation' that Apple used to give you for free with
grouped table views.

• Adjust the layer to add corners and a border"
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3035
Location: Europe

PostPosted: Tue Dec 24, 2013 10:25 pm    Post subject: Reply with quote

so - iOS7-UItableViewCell display in a table view with style Grouped

"This solution will work for iOS7, as well as previous versions of iOS.

Create a custom UITableView cell class and override UITableViewCell. In
setFrame you can adjust desired cell size. Both setFrame and setAlpha are
called after tableView:willDisplayCell:forRowAtIndexPath: so any accessory
views and image views display correctly."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3523
Location: Zagreb

PostPosted: Sat Oct 22, 2016 6:17 pm    Post subject: Reply with quote

so - View based NSTableView editing

"By default, each cell (instance of NSTableCellView) has an NSTextField
sitting on it. When you're editing the cell, what you're in fact editing is this
text field. Interface Builder makes this text-field non-editable"


so - Having a UITextField in a UITableViewCell

"I'm trying to do that for a couple of days now, and after reading tons of
messages of people trying to do that too, I'm still unable to have a fully
working UITextField in some of my UITableViewCells..."


"Basically we take the stock UITableViewCellStyleValue1 and staple a
UITextField where the detailTextLabel is supposed to be. This gives us
automatic placement for all scenarios: iOS6/7/8/9, iPhone/iPad, Image/
No-image, Accessory/No-accessory, Portrait/Landscape, 1x/2x/3x."


so - NSTextField in NSTableCellView

"I have a view based NSTableView with a custom NSTableCellView. This
custom NSTableCellView has several labels (NSTextField). The whole UI of
the NSTableCellView is built in IB."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3035
Location: Europe

PostPosted: Tue Apr 10, 2018 8:59 pm    Post subject: Reply with quote

Karen Grigoryan - Creating a settings screen using UITableViewController

"The solution is so simple, I can't believe I figured it out only now, after two
years of doing iOS programming.

You create a UIViewController and a UITableViewController. Then you put your
UITableViewController inside your UIViewController, as a child view controller.
That's it."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3035
Location: Europe

PostPosted: Wed Apr 17, 2019 10:13 pm    Post subject: Reply with quote

https://old.reddit.com/r/iOSProgramming/comments/be6wv6/how_can_i_add_app_setting_like_facebook/

How can i add app setting like Facebook (i.redd.it)


Here's the GitHub linked in the article: https://github.com/abhimuralidharan/SettingsBundleTest
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3035
Location: Europe

PostPosted: Mon Aug 07, 2023 3:31 pm    Post subject: Reply with quote

medium.com - How to setup a TableView in 2019 (Obj-C)

"I asked some friends for some help and they pointed me in the right
direction, the apple docs on table views. So after a little tinkering here is
the basic setup for table views in objective-c. Lots of pictures below!"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group