Giter Site home page Giter Site logo

Comments (7)

cconstable avatar cconstable commented on June 19, 2024

I think we have a couple of options:

  1. Move the map on top of the table view. This will cause the map to redraw it's labels when it's resized so I don't think this is a good solution.
  2. Make a special case for small tables that fixes the height of map view or disables scrolling. This also doesn't sound ideal.
  3. I think the best solution would be to create an intermediate UIView that starts out the top of the first cell and goes all the way to bottom of the page to obscure the map view. This view would need to grow / shrink as the page is scrolled. This solution would also allow cells to be transparent. It would act as a background view for the table view.

I'll try to get that added this week but if you want to take a stab at it feel free :)

from locationpickerview.

ripplearc avatar ripplearc commented on June 19, 2024

The way I do it is to set background color for each uitableviewcell,
although I know it is quite inefficient.

On Mon, Jul 29, 2013 at 10:24 AM, Christopher Constable <
[email protected]> wrote:

Hmmm, that's a good question. There's a couple solutions I can see right
off the bat but they all have side-effects:


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-21723160
.


Suyang Dong

Augment and Personalize People's Perception About the World.
I am able to do all things in him who empowers me.
I will persist until I succeed.

Entrepreneur
Ph.D. in Civil & Environment Engineering
Master of Science in Computer Science & Engineering
The University of Michigan

from locationpickerview.

cconstable avatar cconstable commented on June 19, 2024

Even setting the cells background color will not produce good results though if you only have two cells:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
    cell.contentView.backgroundColor = [UIColor yellowColor];
}

locationview

from locationpickerview.

gudeidea avatar gudeidea commented on June 19, 2024

Setting the background color for each uitableviewcell will not work when the table gives 1 result.
I think the best solution will be inserting an uiview between mapView an tableView and swap depth when expandMapView is called.

from locationpickerview.

cconstable avatar cconstable commented on June 19, 2024

I haven't given it much thought yet but so far that's the solution I like best. It's not the most efficient but neither is parallax scrolling to begin with :) I think preserving looks and aesthetics should be a priority here.

from locationpickerview.

charliefancelli avatar charliefancelli commented on June 19, 2024

Hi,

I had the same issue so i just finish to add this fixtures. It's work fine and preserve the looks and aesthetics.

In the .h file juste add :

 /** The view to the tableview background view. */
@property (nonatomic, strong) UIView *backgroundView;

/** The color of the backgroundView */
@property (nonatomic, strong) UIColor *backgroundViewColor;

In your .m in the - (void)initialize function

self.backgroundViewColor = [UIColor clearColor];

And finally at the bottom of the - (void)layoutSubviews function

if (!self.backgroundView) {
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0.0, self.defaultMapHeight,
                                                                self.tableView.frame.size.width,
                                                                self.tableView.frame.size.height - self.defaultMapHeight)];
        view.backgroundColor = self.backgroundViewColor;
        self.backgroundView = view;
        [self.tableView insertSubview:self.backgroundView atIndex:0];
    }

You should have what you expect.

from locationpickerview.

gudeidea avatar gudeidea commented on June 19, 2024

@charliefancelli Thank you so much! Now it's working fine now

Now, I'm facing some bugs on iOS 7, but only on layout stuff.

from locationpickerview.

Related Issues (12)

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.