I am using FluentLayout to create IOS layouts and I am trying to remove a constraint and it does not work. I tried using both RemoveConstraint and Constraint.Active = false but none of them are working.
Do you have any idea on how can I do this?
You should call LayoutIfNeeded() on the current View afterward.
Related
I'm trying to open a View with a ViewModel from my MainWindowViewModel.
It works, but all I get is a blank window. It binds the correct title but every other control is missing.
Did anyone have the same problem and found a solution?
You forgot the call to InitializeComponent in your code-behind. Just a tip: create a base class with the Catel behaviors, then use that as a base view. It will keep your actual window code-behind much cleaner.
I can't seem to be able to get the keyboard to default to black in my code. I've tried the solutions in the other posts with no success. Not sure if I am missing something. I want it to apply to all view controllers so I want to put it in my app delegate. This is the code I believe should be doing the trick, but its not working for me.
textfield.keyboardAppearance = UIKeyboardAppearanceDark;
I don't know what your variable "textfield" is, but if it is an instance of a UITextField, then it will only set the keyboard appearance for that specific textField instance.
If on the other hand you want to set it for all UITextFields throughout your app use instead:
[[UITextField appearance] setKeyboardAppearance:UIKeyboardAppearanceDark];
somewhere after your appstart, e.g. application: didFinishLaunchingWithOptions: in your app delegate.
Is this possible to apply new style to already created DialogViewController? In one of my views I need to clear root and change from grouped to plain view.
Just setting style to new one doesn't do anything, so I'm not sure if I need to call some refresh method or this is not possible at all.
Found out looking at Monotouch.Dialog code that you need to call TableView.LoadView for this to happen.
I need to detect long-press on a UITextView, which already recognises long-press thus it has a long press recognizer, can I create a new one and add to it? How will it work then, two recognizers will get the same callback when you long-press?
Thanks!
Just add two UILongPressRecognizers with different selectors (initWithTarget:selector:) to the view. It should work just like you think it will work. You may need to return YES from your delegate's -gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: when both of your UILongPressRecognizers are invoked simultaneously.
Note that you will likely encounter problems with Apple's recognizer for popping up the magnifier loupe.
I had a customcell for my tableView.Recently I have changed some controls in the cells.I am facing a problem.The new controls are not showing when I am running my application.
Even I removed all the labels, uibuttons from the cellView.But nothing is working.It's something like it's stored the controls in the memory.How can I get rid of this?
Try to clean the project and build again.