UA-17470720-3

Jump to content


Photo
* * * * * 1 votes

Back arrow appearing and disappearing


  • Please log in to reply
20 replies to this topic

#1 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 10 November 2014 - 01:15 AM

Just having a play around with STV4 and have noticed some odd things..trying to see how much can be done within IB without having to code anything:)

 

is there an IB setting to adjust the type of navigation bar buttons?? i.e. SCNavigationBarType

Attached File  Screen Shot 2014-11-10 at 7.10.32 pm.png   62.99K   14 downloads

I can't seem to remove the EDIT button

 

When the edit button is tapped and then the done button, the back arrow appears and then disappears

https://www.dropbox....l/STV4.mp4?dl=0


Edited by ozie, 10 November 2014 - 01:17 AM.

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#2 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 10 November 2014 - 03:45 AM

Im not sure about the IB stuff, but the back arrow appearing and disappearing in the root view when the back button shouldn't be there, has been a problem for a while. It happened with STV 3/iOS6/iOS5 as well, and is related to a disappearing button issue I had a while ago:

 

http://sensiblecocoa...pearing-button/

 

 

I got around the issue by adding my button back in viewWillAppear.


Cheers,

Dave

www.dgapps.ie

#3 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 10 November 2014 - 06:46 AM

Thank you guys, I'll check it out.

 

@ozie: We really wanted to add SCNavigationBarType to IB, but that meant that you had to use our own SCTableViewController object from the Object Library pane instead of just a regular UITableViewController. Maybe we should just eventually do that, what do you guys think? It's always a struggle to keep the "requirements" to the bare minimum in order to make STV as intuitive as possible.



#4 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 10 November 2014 - 09:47 PM

The main problem i see is that if I drag onto the nav bar a new uibarbutton, one to each side and run the app.. they are removed and replaced with just a edit button..

so i am wondering where this edit button is coming from?? thought adding my own buttons would stay there, but both get removed..

 

Since I think most of my forms are going to need code behind anyways i don't fully see a need for a custom IB SCTableViewController form.. but it would be nice to be able to add things in IB and have them remain there during run time


P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#5 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 11 November 2014 - 09:19 AM

Got this ozie. To be fixed in our next release. Thanks everyone!



#6 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 13 November 2014 - 04:22 PM

Should now be fixed in 4.0.2.



#7 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 02 December 2014 - 01:52 AM

Hi Tarek,

 

 

if I have:

 

    self.navigationBarType = SCNavigationBarTypeEditRight;
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Test" style:UIBarButtonItemStylePlain target:self action:@selector(testAction:)];

 

when the table comes out of Edit mode the Test button still disappears. Once the button has gone, coming out of Edit mode still causes a < to appear briefly.

 

This is with STV 4.0.4, iOS 8.1 Simulator, Xcode 6.1 and OS X 10.10.1, and this is all in code, no XIB or Storyboards, and it's in the root view controller, where there wouldn't be a back button at all.

 

It looks like there is code in SCTableViewController editButtonAction that is setting the leftBarButtonItem to nil, which might be the culprit.


Cheers,

Dave

www.dgapps.ie

#8 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 02 December 2014 - 01:54 PM

Fixed in 4.0.5.



#9 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 03 December 2014 - 04:02 AM

My "Test" UIBarButtonItem does not now disappear from the leftBarButtonItem(s) when exiting Edit mode.

 

I am still seeing the flash of the < when there shouldn't be a back button at all. 

 

In my own code I added the button back in modelActions.shouldEndEditing to avoid it disappearing, and that also seems to stop the flash of the <.


Cheers,

Dave

www.dgapps.ie

#10 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 03 December 2014 - 05:47 AM

I wasn't noticing the flash but now I understand why it's happening. Should be gone from next release :)



#11 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 03 December 2014 - 05:58 AM

Hi again David,

 

Can you please share the relevant code for your view controller? I think we're testing different ones since I am still not able to replicate the flashing button. Thanks!



#12 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 03 December 2014 - 06:58 AM

Hi Tarek,

 

The example project in this thread:

 

http://sensiblecocoa...nship-involved/

 

 has the flashing <.

 

That there's no Cancel button when in Edit mode probably has something to do with it.

 

And I'm still working on using the Core Data Order instead of the STV orderAttributeName, more details in that thread...


Cheers,

Dave

www.dgapps.ie

#13 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 25 December 2014 - 03:28 AM

yup I'm still seeing in 4.05 the back button flashing

 

is there anyway to disable the automatic addition of the edit button in the nav bar??

in IB i have added my own UIBarButtonItem to the nav bar who's action segue is set.. but when the app runs this button is replaced by STV with an edit button, even thou in IB the ArrayofObjectsSection props does not allow adding deleting etc..(i see there is no option of allowing editing)

i just don't want my button to be replaced without having to subclass the view 


P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#14 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 30 December 2014 - 08:54 AM

Hi Ozie,

 

It's very strange 4.0.5 doesn't fix it for you. I believe our last fix works for Dave's sample (Dave also pls correct me if I am wrong here). Please feel free to send me your own sample Ozie.

 

Regarding your question: yes you can disable the automatic functionality by setting the view controller's navigationBarType to SCNavigationBarTypeNone.



#15 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 30 December 2014 - 09:07 AM

Hi Tarek,

 

 

4.0.5 fixed the disappearing button problem, but the flashing < is still there.

 

The flashing < happens only in the root tableView, and only when allowEditingModeCancelButton is FALSE, as far as I can work out. 


Cheers,

Dave

www.dgapps.ie

#16 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 30 December 2014 - 09:11 AM

The code I just posted here:

 

http://sensiblecocoa...ode/#entry11421

 

has the flashing < problem with 4.0.5.


Cheers,

Dave

www.dgapps.ie

#17 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 30 December 2014 - 09:18 AM

And in the code here:

 

http://sensiblecocoa...ode/#entry11421

 

 

 

if I do this:

 

  self.tableViewModel.modelActions.shouldEndEditing = ^BOOL(SCTableViewModel *tableModel) {
        NSLog(@"self tableViewModel modelActions shouldEndEditing");
        self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
        return YES;
    };

 

then the flashing < doesn't appear.


Cheers,

Dave

www.dgapps.ie

#18 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 30 December 2014 - 09:35 AM

Thanks a lot Dave, we'll use that to test 4.0.6.



#19 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 30 December 2014 - 04:08 PM

here is a simple app

 

when you tap a row and then tap cancel, you can see the back button flash

 

Attached File  backbuttondemo.zip   70.79K   8 downloads

 

Oz


  • Tarek likes this

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#20 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 14 January 2015 - 03:53 AM

Hi Tarek,

 

Ozie's flash of the < is when going from the detail view back to the root.

 

My flash of the < is when there is no Cancel button for the root view and the root table comes out of Edit mode.

 

I'm still seeing both flashing < in STV 4.1.0 I'm afraid.


Cheers,

Dave

www.dgapps.ie




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users