How do I maintain my app's background while a website is being displayed? - background

When my app redirects to a web page the background (particularly the stuff near the top) becomes very condensed and I don't know why. It's almost as if the screen is pushing everything closer to the top in order to make room for the website view. How do I avoid this? Right now I have a center border on the website view.
ex: website.add(BorderLayout.CENTER, browser);

I suggest you read about peer components which indicate some of the limitations of peers. Even though we are are revisiting this the core concepts and limits still apply.
Things get pushed because of layout and separation of scrolling behavior. If you stick stuff in the NORTH you will have the website and the content competing for the same space.

Related

iOS7 App Switcher-style Parallax?

I'm trying to create a navigation system similar to the iOS 7 native app switcher - in that I have a set of images along the bottom and a set of views above them, which scroll together, but at different rates.
I understand from a little digging that I need to implement a parallax scrolling effect, but what would be the best way to handle this? Should I set up two UIScrollView instances wide enough for the correct number of images/views, then set the contentOffset on one when I scroll the other? Is there a better way to ensure they stay in sync?
Apologies that this is something of a vague question, but specifically I'd like to know if there is a preferred means of implementing parallax while keeping the content in the two portions in sync in terms of both hitting the centre of the display at the same time, etc.

mfmailcomposer cuts end of html email

I've created an in app email feature to ask a question that opens the mfmailcomposer and fills it with html content. Unfortunately it seems to cut off the final line of the email so it appears as the image below.
I have set the mfmailcomposer to self, followed every tutorial I can find, the only reference to fix it has said the following:
make sure your mfmailcomposer is set to self ie. [self presentModalViewController:email animated:YES];
make sure it's embedded within a navigation controller
Neither solution works.
I have found that if the email contents is short enough that the entire email fits on screen the problem doesn't appear but if you continue typing to push the contents off the edge it reappears.
Any ideas on a solution? Or is this an Apple xcode "design feature"?
I managed to resolve this issue, it seems to be a bug, that's the only explanation I can reach.
If the start of your content is a header (<h1>, <h2>, <h3>, etc) tag (even if it is within a HTML and BODY tag) it creates this issue.
If you want to start your email body with a header tag then the simplest way of fixing it is to add a non breaking spacer before the header tag, it seems to completely resolve the issue.
Possibly a framework bug. Does it occur on different versions of iOS? Try it with both older and newer versions of the operating system and on other devices.
Are you 100% certain that the view is not actually larger than its container view? Explore the view hierarchy. Perhaps in plaintext Apple adds some spacing, so it doesn't seem like the content is out of bounds of the parent view, although it is.
How do scroll indicators behave? Are they also clipped?
Are you presenting the message composer in a fullscreen view? If you're trying to present it in a view that is controlled by a sub-controller of the tab view controller, that might cause the composer view controller to be confused.
For what it's worth, I've just tested my code which generates HTML content, and there is no clipping. This is on iOS 4.2.1 on iPhone 3G, but I don't remember seeing the problem on iOS 5.1 either.
Some tips.
While debugging, don't forget: view controllers are actually just managing views that still have their own hierarchies. To clarify, view controllers may have a hierarchy, but their hierarchy does not necessarily correspond to view hierarchy. (Although it should in the near total majority of cases.) Same thing with views themselves: they have their hierarchy, but they still just control the underlying Core Animation layers, which have their own hierarchy.
You can always access view hierarchy itself and explore it in greater detail through debugging facilities you come up with yourself. What you shouldn't be doing is meddling too much in parts of the view hierarchy that's supposed to be managed by the view controllers, just like you shouldn't mess too much with the parts of the layer hierarchy that's supposed to be managed by the views.

SemanticZoom is not gracefully

I am using SemanticZoom in my project. it works fine but is not handled gracefully. What can I do to make its work more smoothe?
Since your question is quite vague, the general recommendation I could give you is to make the zoomed in and out views similar in structure. For example, if your zoomed in view displays a mostly-horizontal GridView then your zoomed out view should display a similarly structured, horizontal layout. Consider the Start menu in Windows 8. A FAIL would be if the zoomed out view showed grouped icons stacked vertically - that would be visually jarring. The best practice is to remain consistent between views, just changing context.
If what you mean is the performance of the animation, then it might be that the complexity of your two views is more than you can reasonably show on YOUR hardware. Be happy you discovered this on your hardware instead of your users discovering it on theirs. There is no real resolution to this other than decomposing your two views and reconsidering the complexity of the overall design. Before you do this, test of a simple set of views and see.
Semantic zoom should be easy for the user to understand. More importantly, you SHOULD use it because it is a regular part of a metro application and users are right to expect it. The execution of the animation is hardware based so you should have a fluid transition. However, all hardware is not created equally, so don't push the limits - just make an excellent app.

iOS custom status bar that only replaces carrier icon

I'm creating a zombie preparedness app for iOS and I thought it would be cool to have an "Apocalypse mode" which is similar to Airplane mode in that it replaces the status bar carrier icon with a little airplane except possibly with a little mushroom cloud or something instead?
Apocalypse mode would just be a boolean flag in my app the disables all data connection required features (only within the app, not using any private APIs or anything...). If possible, I would still like to have the clock, battery life, Bluetooth icons and whatever else that pops up onto the status bar during normal operation.
I'm looking at the MTStatusBarOverlay library to implement this feature. Related (Stackoverflow post here). I know there is a possibility my app could get rejected for style because of this, but my thought is that I don't want to stray to far from the norm and cross my fingers Apple doesn't jump on me for it.
My question is
How can I copy over the clock and battery life icons? Do I need to hook into an event or is there a UI element I can add.
Am I going about this the right way? Would it be better to just make a transparent overlay on top of the normal status bar with a mushroom cloud that overlays the carrier icon instead of replacing the status bar entirely? I'm worried about variable length carrier icons...
Of course option 3 is I just forget that idea entirely and make some sort of different background or something for this mode, but that seems lame :P
I had a go with something similar a while ago. I created a status bar overlay that accepted touch events, but didn't block the status bar from receiving touches, which is crucial for app store acceptance.
You can check out my question and my answer, however keep in mind it might not be actual anymore, it worked great in iOS4, but never tested it on 5. Worth a try though.
As for the overlay itself, I suggest covering everything up to the clock, and leaving the rest transparent, it should do the job.

How do I render the scrollable regions of a canvas with IViewObject::Draw?

I've been trying to render the entire canvas in an IWebBrowser2 control to a bitmap. IViewObject::Draw seems to be the most promising approach, but I can't get it to render anything that would requires a scroll to show. While I could automate the scrolling and stitch the images together, this would look weird with any fixed position elements. Is this even doable?
Additionally, I've tried to set the controller's size to one that would allow the entire contents to display without needing to scroll, but Windows caps the max size to the current screen resolution, so that only gets me partially there.
Any help would be much appreciated. I'm currently doing this in the context of Win7 and IE8, but I don't think that should matter much.
Sorry it took so long for me to follow up with the answer to this.
I wrote up an article detailing how to trick Windows into allowing you to resize a window larger than the virtual screen resolution, allowing functions like PrintWindow or IViewObject::Draw to capture the entire client area (i.e., the browser canvas).
http://nirvdrum.com/2010/03/25/how-to-take-full-page-or-full-canvas-screenshots-in-windows.html
An actual implementation of the technique can be found in my SnapsIE repository on GitHub (username: nirvdrum). Unfortunately I don't have enough karma to post two hyperlinks. The repository is linked from the article though.
It is very likely an IE optimisation that avoid to draw more than required. You might be able to scroll the window and call IViewObject::Draw in a loop without any animation occuring ?
I'm surprised that Windows caps the max size to the current screen resolution. Are you sure about that ?