I am designing an app which enables users to login, give a list of Categories, SubCategories and SubSubCategories and then show the products inside of those chosen categories.
To do this I have a UITabBarController with 5 tabs, all of which are UINavigationControllers with the root of each page respectively.
The first of the tabs (called products) has the navigation structure I have described above, Categories -> SubCategories- SubSubCategories -> Products
Now to the problem....
When navigating through this the first time around this will work completely fine, I am able to browse and select categories and products. However if I am to go all the way to the products and press back to the Categories and start again for a second time, if I select a subCategory the navigationController will return a null reference exception.
I am pushing the view controllers using navigationController.PushViewController(viewController, true)
and am not doing any modal presentation as seen in existing questions.
I do hope someone can help.
Thanks,
James McNulty
So I am answering my own question..... For those that may encounter this issue and maybe even a note to self.
So in the Events that I had created I had forgot to unattached the event from the action in my viewDidDissapear() Method -
You should state....
Tapdelegate.Selected -= EventMethod
This is because not doing this or doing this before the method is invoked will cause the viewcontroller to stay in memory and therefore when using
NavigationController.PushViewController(viewcontroller, bool)
will use the same handle that was used for the initial invocation of the event.
This is a no.no. BIG SAD !!!!
Hope this helped you out if you too are having this problem. Enjoy.
Related
Im trying to find view ID to edit it. I know about developer options, but in this case it is not working...
Odoo v12 community version. Trying to edit a view adding a new customer, when adding a followers into task in project module.
Tried to find it in technical -> views but without success
More details - short video showing my problem.
https://www.youtube.com/watch?v=q-oO7upPvto&feature=youtu.be
Beforehand: it is the view base.view_partner_simple_form.
How to find out? Yes, Odoo's debug mode is not helping that much here. But you can use it to find out what model is behind a field where you used "Create and Edit" context menu. In this case it's the model res.partner.
And from there you have to do a detective's work, or a bit like that. Just switch to the views list in technical and search for form views for model res.partner without a parent (base views not inheriting from other views). You will find 5-6 views and have to look into them one by one to find the right one.
For this case that is pretty simple, because there is only one view for res.partner model with so less fields in it.
While writing an app in Xcode8 (swift3) for adding pictures with titles I set up two view controllers, the first of which was embedded in navigation controller. I’ve added an “Add” barbutton in the navigation control of the first view controller (VC), tapping which, the second view controller is shown. I receive the following error when I tap on the “Add” button on the 1st VC.
"objc[692]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x155d38cc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x154b876f0). One of the two will be used. Which one is undefined."
Can somebody please help me understand the issue and to solve it.
2 days of reading every posting i could get my hands on with no luck. Here is what I am trying to do:
I have a standard split view controller that loads a new view controller on the Right for each item you choose on the Left. Standard easy stuff. Now the "impossible part". I have added a big button in the middle of each detail view controller. I want to click the button and have it automatically advance to the next view (simulating someone actually clicking the next item in the root view in the left).
A bonus would be to actually have the left root view side also highlight the next row in the list when the button is hit.
I'd pay fifty bucks for working sample code "not much I know".
Thanks.
I think you should probably read the ViewController Programming tutorial...
http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/NavigationControllers/NavigationControllers.html%23//apple_ref/doc/uid/TP40007457-CH103-SW1
ASP.NET MVC noob here
I was writing a quiz application where a user can select her preferences (e.g. difficulty, number of question etc.), and once she hit a submit button - she got a new page with questions.
The preferences are represented as a "Preferences" object, and the questions are IEnumerable of Question.
This all worked well.
Now I decide both parts should be in the same page - and I don't know how to accomplish that:
Should I have a new model class that is a composition of these two parts?
And also - How will I make the "questions" part appear only after the user completed filling up her preferences and clicked a button?
Should I use AJAX?
I also read a little about partial views and RenderSection.. But I really couldn't understand which approach is the most appropriate for my scenario.
So how should I draw two parts of a page, where the second is only displayed after the first is submitted?
Thanks.
How familiar are you with AJAX? If I had to guess I would think a good way to do what you want to do is to have an AJAX call which is linked to an action when the user submits their preferences. The action can then return a partial view which you can have appear on the page without a reload via AJAX.
I have a Prism/SL3 application with a tab control and each page of the tab control is a "Region" that has its own view and viewModel. when I want to validate the main page, I call dataForm.ValidateItem(), then I go to all the child views and do the same. the problem is, only the pages which user has clicked on them (on the tab page), get instantiated and the pages that are never shown, don't have their view instantiated, thus I can't validate them.
any help?
I created a psuedo work around for this. It's very hacky, but it does work. My example involved walking the visual tree (up and down) to find respective controls that are invalid and then "expanding" the selected item. I have used an accordian in my example, but have also tested this with tab:
http://thoughtjelly.wordpress.com/2009/09/24/walking-the-xaml-visualtree-to-find-a-parent-of-type-t/
HTH,
Mark
EDIT: Link updated.