Comments (7)
I think we have a couple of options:
- 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.
- Make a special case for small tables that fixes the height of map view or disables scrolling. This also doesn't sound ideal.
- 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.
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.
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];
}
from locationpickerview.
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.
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.
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.
@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)
- Allow map to expand smaller than fullscreen HOT 2
- Hide map button is hidden by navigation bar on iOS 7 HOT 1
- MKAnnotatioView Method is missing !
- Present modally HOT 1
- Hides UITableViewCell when number of rows are less (1, 2) HOT 2
- Unable to allocate render buffer storage!
- IOS 11 bug : UIView hide tableView when did expend HOT 1
- Adding new MKMapViewDelegate
- Adding PullToRefresh HOT 3
- How to center on user location when hidden? HOT 3
- iOS 6 problem HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from locationpickerview.