Appcelerator - How to detect redrawing of a TableView on iOS - titanium-mobile

I need to detect when the TableView is redrawed on iOS each time I add a new row.
In android I'm able to use the eventListener 'postlayout' but in iOS when I add a new row this event doesn't fired.

It looks like you've hit a parity bug. Could you report this which I can't find a JIRA ticket for. Could you create one with example code, expected and actual results?
As a workaround, you might be able to add an event listener on that event to the parent view of the table.

Related

Xamarin Forms - Syncfusion SF Schedule swipe Error - iOS only

I have a Syncfusion schedule used in month view, but once I swipe to go to the next month the app crashes and shows me this error:
"Event registration is overwriting existing delegate. Either just use events or your own delegate: Foundation.NSObject UIKit.UIGestureRecognizer+UIGestureRecognizerDelegate"
This only happens on my iOS project and is fine on Android.
I have no custom renderers associated with the feature.
Would anyone know what is causing this?
iOS controls have some gesture events and if you use those gesture events you can't add gesture recognizes or the app will crash. So it is likely that SF control is using those events.

How to create a xamarin apple watch modal send data back

This seems like it should be straight forward, but I'm having trouble solving it.
I will simplify the problem to get to the heart of the question.
I am building a Xamarin Watch OS 3 app. I have an InterfaceController1 and an InterfaceController2 on my storyboard. I added a button to InterfaceController1 and created a segue to InterfaceController2. I made it a modal.
On InterfaceController2, I have Picker list. I want to choose an item, close the modal InterfaceController2 (which automatically sends me back to InterfaceController1), and have that data (whatever I picked from the list) available in InterfaceController1.
This seems very basic...why else would you pop up a modal if not to make a selection and return back to the main scene. But I can't seem to figure it out. I see examples for iPhone apps, but they don't seem to apply for Apple Watch apps. Unless I am misunderstanding something.

After assigning GetViewForAnnotation, Xamarin.Forms class doesn't receive Click event

I have a Xamarin.Forms page with a map containing numerous pins. I've built a custom iOS renderer to change the image of the displayed pin.
Once I assign the GetViewForAnnotation delegate, my Xamarin.Forms class no longer receives the "Clicked" event. I can access it through the custom renderer, I do believe, but what I want to do when the user taps the title of the pin is push another Xamarin.Forms page to the navigation stack, and I don't know how to give control back to my Xamarin.Forms app from within my Xamarin.iOS app.
I have a feeling I'll need this type of logic in a few other places... where I need to handle a CustomRenderer event but then pass control back to the Xamarin.Forms app for navigation or other purposes.
So I have a couple directions I'd like to go:
1 - More straightforward - get my "Clicked" event to fire in the Xamarin.Forms app when the map's pin is clicked, even though the iOS app is handling the creation of the pin via a CustomRenderer
2 - More advanced and customizable - pass control back to my Xamarin.Forms app (maybe raise an event related to the Renderer level?)
I'd prefer at this time to just get my Clicked event back, but I'm guessing that may not work once I assign the GetViewForAnnotation event in the CustomRenderer.
From what I read, you can detect the annotation click within your renderer.
Within your renderer in the OnElementChanged you can get access to the View in the Xamarin.Forms PCL it relates to.
A few possibilities to consider going forward:-
a) Use MessagingCenter to convey messaging between interests (see
here).
b) Use the standard event raising, i.e. public event
EventHandler<someEventArgs> OnSomeEvent through your View in your
PCL.
c) Use an ICommand approach on your View in your PCL if your
more MVVM orientated, and invoke this way instead.
Once you have your notification back through your View / Page, depending on where your doing things, you can then do a normal navigation based on the information you have been given from your platform-specific renderer in the PCL.

UICollectionViewCell for AppleTV does not display contents in Interface Builder

When trying to build up a UICollectionViewCell for an AppleTV app, its contents are not displayed, making it more difficult to good design. Does anyone know whether this is a bug or something I'm doing wrong?
The contents do appear when moving, below are 2 screenshots, one of the normal state, and one of the state of moving an element.
I'm using Xcode version 7.1.1 (7B1005)
I tried and it looks like the cell will only be rendered, if you embed it in a collection view which is embedded in the main view. Additionally you have to add some auto layout constraints:

How to populate Picker items before open, using Xamarin.Forms

Using Xamarin.Forms, how do I populate a Picker with items, immediately before the Picker opens?
We have a number of pickers on the same page and it would be inefficient to populate all items upfront, as some of the queries are expensive. For reference, I'm trying to get this working on Xamarin.Android first, and am using the latest stable version - 1.2.36257 at the time of writing.
I've tried:
Focused event - This almost works, but changes to Items are not applied until the next time the Picker opens.
TapGestureRecognizer - The Tapped event doesn't seem to be fired. Perhaps it doesn't work with a Picker.
There's nothing that the Xamarin.Forms Picker exposes from what I can see either, that would allow you to achieve what your wanting.
TapGesture's can be troublesome. For instance I quickly tried it on WindowsPhone, and that is not recognizing the TapGesture either. Your also find some different behavior with different controls as well - with the same response not being uniform across platforms.
I tried hooking into the Picker PropertyChanged / PropertyChanging, and this has the outcome exactly the same as attempting to hook into the Focused event handler that you experienced, with it only working after the picker has initially been displayed.
The only way around this would be to write a custom renderer to achieve what you want to do.
Within that, you could then expose custom events such as OnBeforeAppearing, that would allow you to then pre-load the picker with the items you need from the page at time of use.

Resources