gajus / brim

View (minimal-ui) manager for iOS 8.
http://gajus.com/sandbox/brim/demo/
Other
391 stars 41 forks source link

Questions about using brim #10

Open ImMyQuest opened 9 years ago

ImMyQuest commented 9 years ago

Hi Gajus,

Couple of questions about brim:-

  1. In the demo index.html you have the test:-

    || platform.ua.indexOf('like Mac OS X') != –1

    Am I reading this correctly, it allows brim to work even though iOS is < 8? What was your intention? I tried the demo on iphone 4 with iOS 7 and did not get the "This demo has been designed for iOS 8." display.

  2. When you establish the scream variable you declare the width for an iPhone 5s like this:-

    scream = gajus.Scream({
       width: {
           portrait: 320,
           landscape: 568
       }
    });

    Does this have any impact on which devices brim works on? The demo seems to work on my iPad2 which is of course 768x1024. Or do I have to specify/target each device’s resolution somehow? If it's not relevant, can I safely call gajus.Scream() without a config?

colemanfoley commented 9 years ago

I am also curious about the width option in the config. I copied the initialization code from the Quick Start section into my web app, and it seems to work well on iPhone 6 (in the iOS Simulator), but not as well on my iPhone 5c. The Quick Start code actually has a landscape width of 640, while the demo you mentioned has a landscape width of 568. It works better on my iPhone 5C with a landscape width of 568, which makes sense, since that is the iPhone 5C's device-width in landscape. Point is, in my experience, the width option does matter. I just ended up doing this:

width: {
  portrait: window.screen.width,
  landscape: window.screen.height
}
ErikAGriffin commented 8 years ago

+1 for clarification on the width config