How to deal with responsive design and iPad/iPhone - ios

Im struggling with a responsive design.
Everything is sized in percentage, and is beginning to work aprox as intended on "regular" screens.
Via javascript I determine window width and height, which sets the background image.
The background image is using the css3 "cover" property.
BUT everything apparently is messing up, on iPad/iPhone.
When the pagecontent overflows the pageheight (which most of the pages do, and are supposed to) then the "cover" property apparently expands and shows the image way too big.
And height and margin-top are suddenly set way too high.
My guess is that iPhone/iPad is considering the entire content including the overflown content as the full page height, and not just the actual visible screen.... But I dont know how to deal with it.
Also, when I alert out the window width, I get: 980 on iPad, iPhone4, and iPhone3. which I guess suggests that I cant use window width, on iPhone/iPad....?
How do I deal with the mobile setup?
My hope was that I wouldnt need to create iPhone/iPad specific setups... but I am beginning to fear that I need to?
Here is the playgroundwith the design: http://basix.popweb.dk
Any help or advice?
Thx
JOhn

Well, I've just checked your website on an iPhone and it seems to load ok, however the layout doesn't seem to responsive to me.
Anyway, are you using any CMS?
Also, as I learning material, I advise you to check http://themble.com/bones/
Even though it's a wordpress theme, the stylesheets are very well exmplained on what works what. Nevertheless it uses SASS or LessCSS (CSS preprocessors) which I advise to learn because it will save you a lot of time when writing CSS. It isn't hard at all, I've learned LessCss in about 2 hours http://lesscss.org/.

Related

Best approach at designing an iOS frontend

I am designing my first iOS app at the moment. Every view of the app needs to be available in portrait aswell landscape. Also all iPhone versions need to be supporrted.
As someone always working with windows and never owning any apple product it was a pain in the ass getting started but slowly things seem to work out. But before the whole design approach takes a wrong direction I rather ask here:
What I want to do is have constraints based on multipliers as much
as possible.
I will try to avoid constant values as much as possible since from
my understanding they arent scaling. I read that you can change them
programmatically but if possible I want to stay in the designer for
frontend related stuff.
Since the multiplier cant be changed based on the current size class
I plan to have a set of constraints for all kind of portrait size
classes and another one for landscape (using installed feature of
xcode)
To up and downscale labels and textviews I want to have a height
constraint to the superview with a very tiny multiplier (will
probably be complicated to keep all textviews the same height when
there are different parents across them?)
In theory this should produce views which up and downscale well and look the same on all kind of iPhone screens. Now I am curious what more experienced iOS designers think about my "plan":
Do you have different approaches?
Is there any book/tutorial/page you can suggest?
Thanks in advance! :)

All iOS screen size compatibility?

New to iOS developing here. Basically I am creating a soundboard app. I have the app essentially working (aka buttons returning sounds).
However my app only looks proper on the iPhone 6. I just have one ViewController in my main storyboard. When I run the simulator for the 4S/5/6+ or iPads, my buttons are pretty much everywhere.
I tried playing with size classes/autolayout through Apple's documentation, but couldn't get it working properly. What's the best (easiest ;) ) route I can follow to have it basically looking the same on ALL devices?
PS: I have one background placed too, I don't mind if it looks different on all devices since it's pretty minimalistic, but if someone can shed some light here too, that would be great.
Thanks!
You have a few options:
1) Continue your plan spending time getting friendly with Auto Layout and Size Classes. This might be difficult at first, but it will really pay off later. You should use the Assistant Editor's Preview mode to let you see iPhone 4, 5 and 6 side-by-side as you work so you can make sure your layouts look great everywhere.
2) Use a component like UIStackView where layouts are automatically adjusted to fit various devices. If your soundboard is as simple as a grid of buttons, you can do that in just a few minutes using a stack view.
3) Use a component like UITableView or UICollectionView where content is designed to scroll. Using this method you design only one sound button of your app (i.e., enough to play one sound) then have iOS replicate that across all the sounds you want. When your interface is presented on a device of a different size iOS will just make the content scroll.
Very roughly, option 1 makes you do all the work; option 2 makes your layout shrink down until it fits the available space; and option 3 makes your layout stay the same size no matter what, but you should expect it to scroll on some devices.
There is no right solution; it's entirely down how you want your app to work.

Horizontal Scroll on iOS — Off Canvas Navigation Menu

After pushing my site to the development server, I'm seeing horizontal scrolling on iOS (which I wasn't seeing when developing locally). I'm using an off canvas navigation menu which is giving the page the extra width. Here is the site.
Any help is greatly appreciated. Thanks for your time!
I inspected your site in Desktop Safari and I see the same issue.
The issue seems to be that the site layout still thinks it's wider. At first I was certain that a simple application of overflow-x:hidden and width:100% would do the trick.
However—
You seem to have done that.
It didn't.
I found it difficult to sift through the CSS because you have a lot going on, and I think it's possible that the CSS3 transforms are contributing to the issue, but I was able to lock it down while viewing in Desktop Safari and while inspecting Mobile Safari directly with the following:
Apply position:fixed to your primary navigation, rather than position:absolute. Desktop Safari was happy with this.
Remove your .site-content::before pseudo-element. This was still causing the issue on Mobile Safari. Removing the CSS transform to translate3d(100%,0,0) also helped.
Side note: You might also consider ways to simplify your HTML and/or CSS. You have 1.1MB loading without any real images; for mobile users, bandwidth is a real cost. I know that can be a PITA but worth mentioning. Good luck!

Ink responsive email: Trouble with block-grid, need assistance

I have used your block-grid template with some customization to match an email concept in order to achieve a responsive design which could work across mobile and in desktop email clients. Technically the right column needs to shift under the first one on smaller screens. I also used your CSS inliner. It works well except for a small problem which is driving me crazy! On my iPhone 4S (v. 7.1.1) in Apple Mail the layout displays a fair amount of padding on the far right instead of extending the tables all the way across the screen. The header and the following block of tables are affected as well as if they would have a padding on the right. I have set the width to be 100% but it doesn't seem to work. I have changed the background color of table cells in the included code in order to see how the tables are defined too.
http://www.aetna.com/creativeservices/email/healthyapps/HAoffer_test3d_justTables_plain.html
Any, suggestions of why the tables are not expanding and misbehaving with extra padding?
Thank you for your feedback in advance.
Attila
It looks like your table with the class name of "apps" is still set to 315px, even in the smaller media queries. I believe setting that to 100% should fix your problem.

Which text rendering framework should I use?

I'm currently scoping out a project for the iPad which is rather text and font heavy. There are many pages of styled text, which also need custom fonts. I have toyed with the idea of simply rendering PDF or PNG files on-screen, but I think we need to be able to dynamically repaginate the text.
We've used UIWebView in a previous project quite successfully, however there are a few things I don't like about it... Firstly, you have to hide all the silly drop shadow elements to stop them showing when the user scrolls beyond the bounds, and we had to add some JavaScript to find out actually when a page had fully loaded. Overall, the experience seemed a bit clunky, as well as worrying if the project could potentially break if Apple decided to update the subviews...
The other thing we've been looking at is Core Text, which looks very powerful. The only worry with this is that it appears to be a rather steep learning curve for us since we've mainly been working in UIKit (with a bit of Core Graphics). I couldn't even work out how to change the size of the font after a morning's work.
Are there any other alternatives*? Should I stick with Core Text? Is there any way of using UITextView with multiple fonts and styles?
Thanks!
:-Joe
EDIT: *by alternatives, I am really looking for built-in iPhone SDK alternatives only please... I would rather not mess with third party frameworks because I don't have the time... Thanks :)
You could use Pango, which uses CoreText when on iOS.

Resources