public override async void ViewDidLoad() { base.ViewDidLoad(); spinner.StartAnimating(); var apiService = new NasaApiService(HttpService.Client); var rovers = await apiService.GetRoversAsync(); _roversTableSource = new RoversTableSource(rovers); roversTableView.Source = _roversTableSource; roversTableView.ReloadData(); spinner.StopAnimating(); }
public override async void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); photosCollectionView.RegisterNibForCell(PhotoCell.Nib, PhotoCell.Key); var apiService = new NasaApiService(HttpService.Client); var photos = await apiService.GetPhotosAsync(_rover, _camera); _photosSource = new PhotosDataSource(photos); _photoTappedGesture = new UITapGestureRecognizer(PhotosCollectionTapped); photosCollectionView.AddGestureRecognizer(_photoTappedGesture); photosCollectionView.Delegate = new PhotosCollectionDelegateFlowLayout(); photosCollectionView.DataSource = _photosSource; photosCollectionView.ReloadData(); }
public NasaModule(NasaApiService nasa, RootController root) : base(root) { _nasa = nasa; }