开发者

Highlighting a cell while touching iphone(giving a glowing effect just like touching a button)

开发者 https://www.devze.com 2023-04-08 05:06 出处:网络
This may be a simple question but i cant find a solution.i\'m using a table view.i want to give a highlight option when user selects that cell.highlight means giving a glowing effect for the cell(just

This may be a simple question but i cant find a solution.i'm using a table view.i want to give a highlight option when user selects that cell.highlight means giving a glowing effect for the cell(just like highlighting a button while touching.Is this possible.Can anyone help me.Tha开发者_JAVA百科nks in advance.


You can do that in several ways:

  1. Programmatically when customizing your UITableViewCell by setting appropriate value of selectionStyle (UITableViewCellSelectionStyleBlue, UITableViewCellSelectionStyleGray or UITableViewCellSelectionStyleNone)

    cell.selectionStyle = UITableViewCellSelectionStyleBlue;

  2. In Interface Builder (if you load your cell from .xib file):

    In the Attribute Inspector set property Selection : blue, gray, none

0

精彩评论

暂无评论...
验证码 换一张
取 消