iphone - Custom drawing on top of a UITableView -


I have some problems in dragging some custom content to a UITableViewI did what I did sub-class UITableView and overwrite - (Zero) DrawRect method like this:

  - drawRect: (zero): (CGRect) rect {CGContextRef ctx = UIGraphicsGetCurrentContext (); [Super drawRect: rect]; CGContextSetRGBFillColor (CTX, 255, 0, 0, 1.0F); CGContextFillRect (ctx, CGRectMake (10, 10, 10, 10)); }  

The problem is that I see my red rectangle, but this table is below the visible cells. Even if I call [Super Direction: Rectit] in the above comment, cells will still be displayed.

My guess is that any internal table which is called the drawRect method, draws cells later, which means the overlapping draw graph is not sufficient because the cells will always be prepared later. .

If you need an image to cover the table, look for UIImageView as a subview form Add to

Anyone can create frames for your new UIImageView and can also specify the x / y coordinate.

  [self.view addSubView: myView];  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -