Git Product home page Git Product logo

Comments (2)

NeilTaylor avatar NeilTaylor commented on August 29, 2024

This is the same as issue #8. I would like to set the "offset" but I do not know how to get the width of the tableView's indexTitle view. The closing comment for issue #8 says that the solution was tested - please advise how to calculate the width of the section index title view. Thanks!

from mgswipetablecell.

NeilTaylor avatar NeilTaylor commented on August 29, 2024

Closing this issue. Although a more dynamic approach could be done, I am satisfied with the swipeSettings "offset" approach. I added the following method to my view controller:

#ifdef USE_SECTION_INDEX_TITLES
-(CGFloat)getSectionIndexWidth
{
CGFloat width = 0.0;
for (UIView *view in [self.tableView subviews])
{
if ([[[view class] description] isEqualToString:@"UITableViewIndex"])
{
// same as frameSize CGSize boundsSize = view.bounds.size;
CGSize frameSize = view.frame.size;
width = frameSize.width;
}
}
return width;
}
#endif

from mgswipetablecell.

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.