question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navigation buttons not showing properly in Fair -> Artist details

See original GitHub issue

In Fair -> Artists -> Artist detail, buttons linking to artwork and “Artist at Artsy” look like this:

The ARNavigationButtons are directly added to the stackView, which is different from all other places that use ARNavigationButton. Seems like the common usage is to add the button in a ARNavigationButtonsViewController and then add the view to stackView. (For example, the “More Info” button in Artwork). In fact, the only other place I could find that is using ARNavigationButton directly is ARArtistViewController, which was replaced by an Emission component.

As a test, I changed the Artist at Artsy button to use ARNavigationButtonsViewController:

- (void)addArtistOnArtsyButton
{
    NSString *title = NSStringWithFormat(@"%@ on Artsy", self.artist.name);

    NSArray *buttonDescription = @[ @{
                               ARNavigationButtonClassKey : ARNavigationButton.class,
                               ARNavigationButtonPropertiesKey : @{
                                       ar_keypath(ARNavigationButton.new, title) : title
                                       },
                               ARNavigationButtonHandlerKey : ^(UIButton *sender) {
                                   UIViewController *viewController = [ARSwitchBoard.sharedInstance loadArtistWithID:self.artist.artistID inFair:nil];
                                   [self.navigationController pushViewController:viewController animated:ARPerformWorkAsynchronously];
                               }
                            }];

    self.artistOnArtsyVC = [[ARNavigationButtonsViewController alloc] init];
    [self.artistOnArtsyVC addButtonDescriptions:buttonDescription unique:YES];
    self.artistOnArtsyVC.view.tag = ARFairArtistOnArtsy;

    [self.view.stackView addSubview:self.artistOnArtsyVC.view withTopMargin:@"20" sideMargin:@"40"];
}

which fixed the issue (and the button still works 😄):

For the button that links to an artwork however, I am not sure how to proceed. It would require having an ARNavigationButtonsViewController for each artwork, which makes me think that maybe the whole thing should live in its own view controller (button, image and description). This is a bit of extra work, so I’d like to confirm the approach is good before starting on it.

On a side note, I tried a few things to make the buttons to show properly without needing ARNavigationButtonsViewController, but no success. Curious to know if I missed an easier solution 🤔

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
alloycommented, Feb 24, 2017

@pedrovereza Awesome and thanks so much 🙌

0reactions
pedroverezacommented, Feb 25, 2017

@orta Cool, the developer extra thing really makes life easier, thanks!

I’ll go ahead with trying to combine the “artwork to show” details into its own view controller. Aiming to have something before the end of next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

List view and navigation buttons not working - WordPress.org
The list view on my site isn't working. It refreshes the calendar but simply loads the month view again. Similarly, the month navigation...
Read more >
Home, Back Button & Recent not Showing Problem - YouTube
Hello Friends!!Hope Aap Sabhi Achhe hai...Home, Back Button & Recent not Showing Problem | Home Button Not Working | Navigation ...
Read more >
Solved: Gallery Navigation button not working.
Solved: Hello, I am having an issue with a canvas app I put together. It uses a gallery that is extended to show...
Read more >
Navigation buttons not visible - Articulate Storyline Discussions
The navigations buttons will come back when the conditions have been met (last step button 'visited' etc) so as the user clicks to...
Read more >
Dallas - The Other Art Fair
We combine affordable and original artworks and 130 independent artists with immersive installations, performances, DJs – and a fully stocked bar. Here, art...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found