Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9187759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:51:11+00:00 2026-06-17T19:51:11+00:00

I am trying to create a layout for my iPhone and iPad app that

  • 0

I am trying to create a layout for my iPhone and iPad app that automatically reflows based on dynamic data.
A bit more concrete, this means that I have several objects. Each object has a certain type and associated data. The data is what should be displayed, the type determines how it should be displayed. A type could be text, meaning it should be displayed as simple text without the possibility for interaction. Another type could be date, meaning it should be displayed as a control that lets the user select a date, when tapped.

Now, the problem is that the objects I want to display are dynamic in number and associated data, so I can’t position the controls at static locations.

This jsfiddle shows what kind of layout I mean. Depending on the width of the div, the content automatically re-flows and the date input control appears in the middle of the text.

I couldn’t find any control that supports a scenario like this – so how would I go about achieving this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:51:12+00:00Added an answer on June 17, 2026 at 7:51 pm

    Here is an example of using CoreText to solve a partially similar problem. Perhaps that will point you in that direction.

    - (CFArrayRef)copyRectangularPathsForPath:(CGPathRef)path 
                                       height:(CGFloat)height {
        CFMutableArrayRef paths = CFArrayCreateMutable(NULL, 0, 
                                                       &kCFTypeArrayCallBacks);
    
        // First, check if we're a rectangle. If so, we can skip the hard parts.
        CGRect rect;
        if (CGPathIsRect(path, &rect)) {
            CFArrayAppendValue(paths, path);
        }
        else {
            // Build up the boxes one line at a time. If two boxes have the 
            // same width and offset, then merge them.
            CGRect boundingBox = CGPathGetPathBoundingBox(path);
            CGRect frameRect = CGRectZero;
            for (CGFloat y = CGRectGetMaxY(boundingBox) - height; 
                         y > height; y -= height) {
                CGRect lineRect =
                       CGRectMake(CGRectGetMinX(boundingBox), y, 
                                  CGRectGetWidth(boundingBox), height);
                CGContextAddRect(UIGraphicsGetCurrentContext(), lineRect);
    
                // Do the math with full precision so we don't drift, 
                // but do final render on pixel boundaries.
                lineRect = CGRectIntegral(clipRectToPath(lineRect, path));
                CGContextAddRect(UIGraphicsGetCurrentContext(), lineRect);
    
                if (! CGRectIsEmpty(lineRect)) {
                    if (CGRectIsEmpty(frameRect)) {
                        frameRect = lineRect;
                    }
                    else if (frameRect.origin.x == lineRect.origin.x && 
                             frameRect.size.width == lineRect.size.width) {
                        frameRect = CGRectMake(lineRect.origin.x,                                                                                                                                      lineRect.origin.y,                                                                                                                                      lineRect.size.width, 
                                    CGRectGetMaxY(frameRect) - CGRectGetMinY(lineRect));
                    }
                    else {
                        CGMutablePathRef framePath =
                                             CGPathCreateMutable();
                        CGPathAddRect(framePath, NULL, frameRect);
                        CFArrayAppendValue(paths, framePath);
    
                        CFRelease(framePath);
                        frameRect = lineRect;
                    }
                }
            }
    
            if (! CGRectIsEmpty(frameRect)) {
                CGMutablePathRef framePath = CGPathCreateMutable();
                CGPathAddRect(framePath, NULL, frameRect);
                CFArrayAppendValue(paths, framePath);
                CFRelease(framePath);
            }           
        }
    
        return paths;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a custom layout that it automatically sets it's dimensions, height
I'm trying to create liquid layout, so that the left side of the site
I'm trying to create a Tkinter layout that has labels and entry fields vertically
I'm trying to create a flexible box layout that fills the entire viewport, and
I am trying to create a layout that will looking like: +---+--------+---+ | |
I'm trying to create a layout that looks like a LI with a bullet,
I'm trying to create dynamic layout with -webkit-box . When children of box grow
I am trying to create an android layout that uses about 1/3 of the
I'm trying to create a layout that has a stationary footer with activities that
I am trying to create a layout that extends to the whole screen if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.