I need to scroll to top the main Interface Controller of an Apple Watch app programmatically after each launch specially if users has left the app after scrolling it down.
EDIT:
This is now possible in watchOS 4. Just use the scrollToObject:atScrollPosition:animated: method.
Unfortunately, this isn't currently possible. WatchKit only provides a method to scroll to the top of a WKInterfaceTable, not an entire interface controller.
The only workaround I've found is to hide every element in the interface controller. This doesn't just hide the element, it completely removes it from the controller. Then when you unhide everything, you'll be back at the top of your content.
Related
I have implemented Twilio voice kit successfully in the application.
I am not able to move in the application from call indicator. Also, I am not able to see green bar on other application screen when user moves from call screen. I have added custom view in navigation bar, but it's not much responsive.
I have following doubts for the same.
Is there any default property which I need to enable to display
native call indicator in the application?
Do I need to put a custom
view as I have done? If yes then what will be the best approach to do
it?
Is there any alternative to display custom call indicator inside
the application rather than adding view in navigation bar?
Any help will be appreciated.
Thank you.
As far as I know, CallKit framework does not have any API for you to use to display their native UI regarding the calls. The green indicator bar is shown if you have an active VoIP call and your app is running in background.
By tapping on it it will just open your VoIP app.
The best approach is to use a custom-built UIView, placed on a separate UIWindow that has the same level as the system's status bar and add a tap gesture on it to achieve what the native green bar is doing. Also, you can even add the animation that fades in and out a label to create the same experience as the native green bar.
I'm making app with using Xamarin.forms.
I wanted to know if there is top window or view for Xamarin.forms.
I want to put something like a alert or indicator so that it remain on top depth all the time until it's gone. (even if new page is pushed.)
I can't find any view or window on XF.
Should I use each native window?
Thanks.
You can try to use Application.Current.MainPage.DisplayAlert method to display alert from the MainPage (which ordinary always exists in app).
I’m working on an application for Android and iOS, which requires a certain flexibility for one or two views. That’s why we created & implemented a service that translated a basic list of objects into a user interface for both iOS & Android. But now that Xamarin.Forms is released, we decided to replace our service by the one Xamarin provides. I did succeed in creating the views with Xamarin.Forms, resulting in better looking & smoother running pages. But my problem lies in the navigation of it. Here is a little drawing on what I would like to achieve:
I would like my app to start an activity that starts with a custom fragment. After clicking a button on this fragment, I would like the page I created with the Xamarin.Forms api to be added to my current navigation stack! Once the user is finished with the Xamarin.Forms page, it navigates to a second custom fragment, all that without breaking the navigation cycle. Does anybody have an idea on how I can achieve this?
For the iOS developpers: replace Activity with NavigationController & Fragment with ViewController
Take a look at CarouselPage for Xamarin.Forms' own approach. It doesn't look like that's what you need but you can also look at its source code and maybe make a custom renderer yourself.
You may also want to take a look at MVVM
As for the easier/hackier way you'd want to make a button on each page and when the button is tapped execute Navigation.PushModalAsync(nextPage) - there won't be a "< Back" button any more, you may need to implement that yourself if you need it.
If by your meaning of 'current navigation stack' is for using the native Navigation of each platform, then remember that you don't have to use Xamarin.Forms' Navigation Model and functions such like PushAsync.
If you prefer to do Navigation with code specific to each platform then you can do this the same as normal. Just create your stub pages in each platform specific project and set the Xamarin.Forms content for each page from the shared project.
From each platform specific stub page (Activity / UIView / PhoneApplicationPage) you could then execute an Action<> call setting on the shared Xamarin.Forms page to help with the navigation, or alternatively, hook into a custom-event that is raised from the Xamarin.Forms** page back to the platform specific stub page to allow you to do navigation from there.
Like Sten mentioned there won't be any 'Back' button so you will most likely have to do that yourself.
I have an Enyo webOS application I am developing for phones. There are several text inputs on the main page, with a button underneath them--however, the button is not viewable below the textboxes. However, there appears to be a scroll lock by default on the main scene--so I cannot scroll down and see the rest of the content.
How can I enable my app to allow for scrolling within a VFlexBox view?
Thanks!
Ah, I found it--I need to change from enyo.VFlexBox to enyo.Scroller for the view. Works fine!
I'm currently working on my first iOS application to run on the iPad, and I've come across a problem. I have been asked to implement menu's similar to the ones in the default applications such as when you click on the "Calendars" button in the top left of the calendars app.
Only issue is, I cant seem to find a standard UI object that looks like these, with the arrow connecting the menu to the button etc. Is this a standard UI component that I should be able to use, or will I have to imitate them by creating a custom object?
Thanks for any help.
That is a UIPopoverController. There isn't an Interface Builder control for this. You need to create one programmatically:
UIPopoverController *popover = [[UIPopoverController alloc]initWithContentViewController:someTableViewController];
See the documentation for more information and sample projects, specifically ToolbarSearch: