iPhone/iPad: Universal App and InAppSettingsKit - iphone

I have a application which is a universal application. On iPhone, it's a Tab Bar application and on iPad its a Split View app. For settings, I really wanted to include the three most important settings in my application, and then launch the Settings Application on demand for minor settings (but Apple screwed us there). So I'm trying to integrate InAppSettingsKit.
Because the application is a universal binary, InAppSettingsKit must be installed in Shared/. Otherwise I will get problems with duplicate symbols (or I have to duplicate and rename everything with *_iPhone and *_iPad).
I'm trying to cut-in InAppSettingsKit on the iPhone. Because its a tab view, there is no NavigationController as IASK expects (so a tap does nothing except highlight the row cell). So the library will need some modifications. In addition, when I tested a purely iPad cut-in, IASK would SIGABRT because it expected a tool bar (IIRC).
The README only has a link to http://www.inappsettingskit.com, which looks like a lot of programmer related marketing. There are no Universal App samples, and the two samples provided are very basic (not reflecting the needs of a Tab Bar/Split View app). In addition, I have not found a place to ask questions (github does not appear to have a bulletin board system [1]) and there does not appear to be contact information.
Has anyone successfully used InAppSettingsKit in a Universal App? If so, was sharing the best method, or was duplicating files and renaming the best method. Was it worth the effort to debug and modify someone else's work in a vacuum? If someone have a better recommendation, I would love to hear it.
[1] https://github.com/futuretap/InAppSettingsKit

First of all, there's an "Issues" area on the GitHub page where you can ask question, too. We don't give individual advice because we wanna avoid duplicate work for a voluntary project.
I don't see why you should need to modify InAppSettingsKit at all depending on whether it's used in a tab bar or split view controller.
Take a look at the sample project where we integrate IASK into a tab bar, a navigation controller and a modal view controller.
Other than that, I'm afraid, I don't have specific advice how to integrate it into a Universal binary.

Related

ReactiveUI - Confused about Routing

I'm in the process of comparing MvvmCross with ReactiveUI for a major pharma project on Win Store, WP8, iOS, Droid. We've already selected Xamarin.
I'm totally new to ReactiveUI. I really like what I see in principle, and I think Paul is a genius. However the details are becoming a real bear. I've spend several days tracking down documentation (the manual is from 2011 and seems almost entirely outdated - it doesn't even contain the word "Router") and sample code.
I'm looking at the sample from ReactiveUI.Samples
Also the project MobileSample-RT from the ReactiveUI solution.
I based my little hello world on the ReactiveUI.Samples "Routing" example. Frankly this isn't much of an example as all it does is navigate from AppBootstrapper to the one and only view. I'm trying to do something similar to the "three page" example from MobileSample-RT. The problem is, if I try something like this in my project:
HostScreen.Router.Navigate.Execute(RxApp.DependencyResolver.GetService(typeof(LoginViewModel)));
It crashes (pdb symbols not loaded in ReactiveUI.dll)
If I try this:
HostScreen.Router.NavigateCommandFor<LoginViewModel>().Execute(HostScreen);
Same result - hard crash. That really threw me as it seems like something that should "just work".
I can call this:
HostScreen.Router.Navigate.Execute(new LoginViewModel(HostScreen));
And it does go to my view, as expected. I also wired up a back button in the main screen:
this.OneWayBind(AppBootstrapper, x => x.Router.NavigateBack, x => x.BackButton.Command);
And that indeed moves back from the view to which I'd just navigated.
So now I want to move forward again. I click on the button that does this (again):
HostScreen.Router.Navigate.Execute(new LoginViewModel(HostScreen));
And I go back to that view. However this time it takes 2 clicks on the back button to get actually move back. If I then move forward again, it takes 3 clicks the next time. The NavigationStack is filling up with new instances of LoginViewModel.
So, what IS the correct way to do routing/navigation? Why are those commands crashing? Rather than calling "new" each time in the Navigate.Execute, how do I navigate to a viewmodel that is already in the navigation stack (or should it be there in the first place?).
Many thanks for any clarity you can provide.
If you're building for iOS and Android, you simply don't want to use Routing - the notion of routing conflicts too much with what the platforms want you to do (even on WP8 it's a stretch but I was able to hacky make it work). You should stick with View-first location.
However, if you're using Xamarin Forms, ReactiveUI works great with VM-based routing (since Xamarin managed to do all the hacks to make it possible!). Check out https://github.com/paulcbetts/xamarinevolve2014 for a demo of it
I know the docs suck and I'm working on new ones:
https://github.com/reactiveui/ReactiveUI/pull/391 - Pull Request / Progress
https://github.com/reactiveui/ReactiveUI/tree/docs/docs/basics - Browsable version

Create springboard like main view

Is there some sample code, or an easy way, to implement an application with as its first view something like Springboard?
What I am looking for is just a view with basic icons which after a tab on an icon tells the view-controller to push the view associated with the selected icon.
This in itself is not that difficult off-course (just putting images on a view), but is there an easy way to implement all the extra functionality as well (as e.g. moving the icons around (start 'vibrating' when when you push hold them), multiple pages etc.). The Facebook App seems to have this. It is probably not worth my while to write it myself, but it would be nice if there is something 'out of the box' to give the App a bit more of an iPhone feel.
Thanks in advance!
Facebook uses the Three20 library for its UI. The specific view used for the SpringBoard-like interface is known as TTLauncherView.
This is not an endorsement (I have yet to really check this out, and I may be too entrenched in using Three20 at this point to even bother), but here is another project that implements the springboard functionality: myLauncher on Github
You can use UICollectionView to create this
Look at this example
https://github.com/tularovbeslan/Springboard

How to implement iPhone TitleBar in Android

You know in iPhone, The four components of a typical iPhone application are
a title bar,
a navigation list,
a destination page,
and a button bar.
for The Title Bar
The title bar includes the following elements:
Back button:
Screen title:
Command button:
My question comes, although i can use UI framework tool, such as:
Phonegap,
iui,
jtquery
to develop web app, but i can't display the TitleBar effect in Android,
i can't use below code in Android:
meta content="yes" name="apple-mobile-web-app-capable"
Actually, the above can work in Apple Safari Browser, but I can't use Safari to display our Android Project, which is i don't want to see.
Does anyone know how to fulfill this effect in Android, please help me, your help will be great appreciated.
to
"It's unclear if you developing a native android application or a webapp.
– alexanderblom yesterday"
sorry that i forget to mention, i want to develop a iphone-webapp-style application in Android. Since it's too difficult, i want to use iWebkit, but it seems only work in apple iPhone OS or Safari which contain the specific engine to display the beautiful layout, like below:( -_-! i am new so i can't post images here)
(source: appshopper.com)
If I'm not mistaken, if you want to custom in any way the title bar at the top of your screen, you have to do several things :
First, read this thread about titlebar customisation, as it's quite detailled.
Then, you have to add a few more things to it to match your requirements, all in the same xml file which will be your titlebar.xml:
-a button, on which listener you assign the same keyEvent as the normal back key of every android phone.
-a textview for whatever title you want to put in.
-a button for the command button, for whatever it does in Iphone (if you tell me what it does, maybe i'll be able to give more details)
Then, as I take it, you want to have it available on all your pages, without having to request titlebar customization on every activity, I would recommend you to use the same trick as I did : Define a superclass, which all your activities will extend.
then you you requestwindowfeatures in this class, and do all your customization in this one.Finnaly, You just have to call the variable of your titlebar textview in the oncreate of all your subclasses to assign the string you want on each page. If your string is generated dynamically from, lets say a file name you load from the internetv in a background thread, you will need to define a handler to the main thread as you can't update a view from another thread than the one that has created it.
Hopes that helps. If you have any question about that, feel free to ask, i'll keep an eye on your topic, because I had quite a pain to make my titlebar work properly.
good luck

Is it possible to turn a View-Based App into a navigation-Based App?

I am close to finishing my first application (a UITableView style one) on the iphone but have realised it will look much better, and stand a far better chance of getting through the approval process, if it is presented as a navigation-based app rather than a view-based one - in hindsight my initial choice is not really suitable...
Is it possible for me to somehow change easily the application into a new type, or would i be better starting again from scratch with all the hassle that would entail...
thanks for any advice on how it may be done,
karl
It wouldn't be particularly difficult to shift the means of interaction to a navigation controller from a simple view controller (it also isn't difficult to go the reverse direction). Although, there isn't anything as simple as a tutorial on how to do it or menu item you can select. You could look at the plumbing generated by Apple's template for a navigation based application and add the necessary glue to your app delegate. Once that is in place you could simply push your view based applications view controller onto the navigation stack. If you have more specific questions or are stuck somewhere in particular we can help to get you un-stuck if you provide details about where you are running into issues.
As an aside, I doubt your application will be rejected solely for being view based vs. navigation based.
Hmmmmm, for soem reason t wont let me add anything to comment on your post!
Anyway, i guess this is as good as anything here...
Ive been messing for the last hour or so and have managed to integrate my old code/data etc into a new navigation one without too many problems, in fact it looks nicer with a title bar at the top!
(I do like to try and work stuff out for myself so its a good learning curve!)
I am still struggling in that although the new view opens up i am
struggling to use a string from the first view (I have a UITableview table in there, i select a row and get a correct value from it which i currently check via an alert message) in the second view.
for some reason i do not get a title bar and 'back' button in the 2nd view so i guess it is not being put on the stack correctly (I have put a quick 'return' button in the view for testing purposes so i can navigate backwards and forwards).
Still, Im about 100% further on than i was earlier!
cheers for the reply,
Karl

How can you have a page with a button that change views that is not a table view? (iPhone Developing)

I asked a similar question and someone gave me a tutorial link. But, the link made me use a table view and it looks bad with all the lines and stuff. So how do I just make a view with a button and background and stuff (Please write steps in 1.2.3.. format and it would be nice if you attached the code needed too.)???
It's really difficult to fit that kind of project into a comment field, and, in any case, the best way to learn is to get your hands dirty.
Take a look at the Utility sample project that is built into Xcode. Create a new project in Xcode, and under the iPhone Application templates, select Utility Application. This template project uses a button to switch between two views.