cocoa touch - Using gradient as background in UITableViewCell -


possible duplicate:
uitableviewcell custom gradient background, gradient highlight color

hey, want put slight gradient background tableview cells make them more interesting. should make image , put on background or use code draw it? if if should use code explain how? ps. got custom cell

make image first, gradient.jpeg instance.

then following done inside -(uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath method configure cells.

uiimage *image = [uiimage imagenamed:@"gradient.jpeg"];

uiimageview *imageview = [[uiimageview alloc] initwithimage:image];

imageview.contentmode = uiviewcontentmodescaletofill;

cell.backgroundview = imageview;

[imageview release];

and yes make image, meant done on capable image editor.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -