textDidUpdate: never returns with YES flag
I call textDidUpdate with YES flag and it doesn't return. I then call it with NO flag and it doesn't return, I comment [self.view layoutIfNeeded] within the method, and it works.
What do you mean by "it doesn't return"? What are you trying to do?
It hangs on that specific line. I'm .... using it :smile:
So, you're experiencing an exception in the line of [self.view layoutIfNeeded]?
correct
Mind sharing you backtrace? Just like you did in https://cloud.githubusercontent.com/assets/768893/10657565/2831c162-7896-11e5-9ee9-420e3275b2ce.png
It never advances to [self slk_enableTypingSuggestionIfNeeded];, which means the UI completely blocks
Is self.view nil?
I would, @dzenbot, but there is no crash, meaning no backtrace
The self.view is not nil
self.view = <UIView: 0x13e821470; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x13e8215d0>>
I'm doing this in my view controller (I have a form of segmented control for which I have different dataflows from web sockets - just to get the general idea) :
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
dispatch_once(&_selectDefaultFilterToken, ^{ // _selectDefaultFilterToken is dispatch_once type
[self filterSelected:GabFilterHost];
self.filtersView.filterType = self.filterType;
});
}
// and in filterSelected: I am calling
- (void)filterSelected:(GabFilterType)filterType {
[self hideNewPostsButton];
self.filterType = filterType;
self.inputToolbar.underground = [self shouldHideInputToolbar];
[self textDidUpdate:NO];
[self updateFeed];
}
When I use textDidUpdate:YES, it completely hangs. When using NO, and commenting [self.view layoutIfNeeded];, it goes on
What if you move that logic from viewDidLayoutSubviews to something like viewWillAppear: or viewDidLoad? Same thing?
it's there because I already tried it and it's the only way for the screen to not look funny. By 'funny' I mean the views get overlapped and some glithces occur if I try to do it the standard way - in viewDidLoad
Gotcha. Not sure what's going on honestly. Haven't experienced this before, and it's very strange that you're just not getting an exception.
You probably already did, but try compiling with another SDK version and/or device types.
I will! Thank you for this and if I have updates, I will get back with additional info
I'm having the same issue on iOS7. No error or exception. The app just crashed at the line [self.view layoutIfNeeded]; in SLKTextViewController. It works fine on iOS9.
Crashes without exception? Did you repro on device or sim?
I don't see any error messages in the console. I can reproduce the bug on my iphone 5c with ios7 installed.

Is this still an issue? Found any work around?