Code Monkey home page Code Monkey logo

Comments (4)

jasonf01 avatar jasonf01 commented on July 29, 2024

Okay, i've looked into this a bit further and it seems caption width might have something to do with this; the caption appears to be overwriting the text input field, though as the cursor position changes at times, I wouldn't rule out incorrect placement either. This can be proven by going to the GetCell function in Elements.cs (about line 1450) and adding a line changing the text labels alpha to semitransparent; the text field can be seen behind the blank space that is on the end of the text label.

from monotouch.dialog.

migueldeicaza avatar migueldeicaza commented on July 29, 2024

I can reproduce the bug. I am not sure what is going wrong, since the entry that is created has the right dimensions.

from monotouch.dialog.

migueldeicaza avatar migueldeicaza commented on July 29, 2024

Found the reason for the problem.

The error happens because we end up reusing a cell for those rows, and the cells that we happen to reuse are the ones that had an empty caption to begin with (the first row after "Address"). It seems that an empty label creates a view that spans the entire visible area, and the cell can not be reset properly after that.

This seems to be a bug in iOS's UITableViewCell, some sort of caching is not being cleared inside iOS. Because once the Caption is set to the empty string, even if the caption is later reset, the Frame associated is no longer recomputed.

You can observe this behavior by setting the cell.TextLabel.BackgroundColor to some solid color, you will notice that the editing line is there, it is just being completely covered by the frame for the control.

A quick solution is to not pass "" for those empty lies, but instead pass a space. Meanwhile, I think I will make it so EntryElements never reuse cells.

from monotouch.dialog.

migueldeicaza avatar migueldeicaza commented on July 29, 2024

Closing.

from monotouch.dialog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.