문제

iOS 7 has changed how maps are displayed by apps on the iPhone, and especially how the user configures the map.

The map is displayed like this, with an Info button.

Maps

When the user taps the Info button, the configuration screen slides up.

Configuration

How do I recreate a screen overlay like this in my code? While I don't want the user to be dropping pins, I want the user to be able to switch between different map styles or open the address I'm pointing to in Apple's Maps app.

도움이 되었습니까?

해결책

If you are trying to do a simple overlay view, then look into making an UIView slide up through UIView animations. Other than that, you would need an UISegmentedControl and related code. You would also need to blur the view and make it translucent, so look into my other question and answer on how to properly blur an UIView:How to apply blur to a UIView?

다른 팁

I've never looked into it, but I've heard the only easy way to do a translucent background (as in, without writing your own OpenGL code) is to create a UIToolbar instance.

I'm guessing you'd make a toolbar with no items, just treat it like UIView and add your own subviews (UITableView, etc). It is a subclass of UIView.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top