I have a view controller containing table view. In particular scenario I am re - initiating the view controller. In that case I am getting this error.
UItabelViewWrapperView tableView:numberOfRowsInSection
Note: My code is perfectly runing on ios 7. It keeps getting crash in ios 8.
I had the same problem. On my end, the problem was appearing when the view controller was popping to its root, navigating to the new views controller that I wanter and finally go back to the very first view controller (that was on another tab). So the solution for me was to remove the popToRootViewController method. That worked for me. I don't know your code in detail so I can't provide you a better solution or opinions.
I hope that helps.
n.b.: I am doing the navigation from AppDelegate.
Related
I'm trying to build a view in laravel that will allow the user to drag and drop widget on and off the page as well as around the page and resizing them.
Everything I read suggests this is not possible in laravel as the view seems fairly immutable.
Does anyone have any pointers?
ok.. no laravel can't do it, at least thats what I think..
However you can do it with javascript and store the widget locations in laravel..
Things I did find though for the next person...
https://stackoverflow.com/questions/7514660/how-to-create-draggable-widgets
https://github.com/hootsuite/grid
https://code.tutsplus.com/tutorials/how-to-mimic-the-igoogle-interface--net-1794
TL:DR - How do I create Relationship Segues in Xcode 4.4?
Hello everyone, I have an app where I want to add some tabbing behaviour to one of my controllers but, due to design decisions, I can't use UITabbar. I already know about using a UIToolbar with a UISegmented control inside it, but where I'm having difficulty, is how to switch between view controllers.
I know I can't use normal segues (since each tab change would keep stacking a new controller on top of the previous), but UITabBar has something called "Relationship Segues". I looked around but couldn't figure out how to create one.
Does anyone know how do it? Also, is there a better way to approach this problem?
Thanks
I've done the exact same thing recently. I've created a container view controller, SegmentedViewController, and added the view controllers I wanted to switch between to my container controller using addChildViewController. Upon switching view controller (I used target/action on my UISegmentedControl), you call transitionFromViewController:toViewController:duration:options:animation:completion. That's the general idea. Look at the "Implementing a Container View Controller" section here for implementation details.
After reading several posts on this subject I have yet to find an answer to my problem. I have an MVC 3 application and have added an Area to it. Everything works great until I try an return a view from a controller within the Area.
I can successfully post to the controllers Save Method but upon simply returning the view (return View()) I get the following:
The view 'Save' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Areas/Test/Views/Default1/Save.aspx
~/Areas/Test/Views/Default1/Save.ascx
~/Areas/Test/Views/Shared/Save.aspx
~/Areas/Test/Views/Shared/Save.ascx
...
This seems so basic, not sure why I am running into so much trouble.
Ive used Phil Haack's RouteDebugger (http://nuget.org/packages/routedebugger) and all routes are working as setup...
MVC is expecting (by the convention) a view (with the same name as your action name in any one of the folders (by default, But you can override this). You should have the view in any of the folders. That is the MVC convention. So add your view to that folder. You can add it by right clicking the Return View() statmenet in your action method and selecting Add View option. It will automatically add one view.
Or you can right click on the Areas/Test/Views/Default1 folder and select Add View and save it with the same name as of your Action method. If you want to save it with a differnt name than the action name, you can use the View method like this
return View("MyOtherViewName");
Assuming that you added a MyOtherViewName.cshtml as your View in the Areas/Test/Views/Default1 folder
I have a very straightforward ASP.Net MVC3 application that executes an action on an index page which retrieves data from a database and displays a list of items. When I click an ActionLink for one of those items to go to a details page, and then click the back button (or hit backspace), it takes me back to the index page, but none of the data is there. Setting a breakpoint in the controller's action method shows me that the breakpoint is not being hit. If I hit F5, it then hits the controller and method.
This does not happen in Chrome or the latest release of FireFox, everything works as expected. It seems to be an IE issue.
Any ideas?
Thanks!
This could be because the action is caching although I would still expect the page to show the original values.
Try this. I prefer creating an attribute and decorating the actions with [NoCache].
Having a problem deploying an MVC application.
Basically the site loads correctly, the home page appears. However anything which needs to access a controller action does not. So all the links just throw up 404 errors.
Does anyone have an Idea why the site loads but after that the controller actions appear not to?
Thanks
Are you running your app in IIS 6? If so you'll need to configure the .mvc extension or configure wildcard mapping. Steve Sanderson has a good post on it.
The fact that the home page appears indicates that you have at least one controller working properly. Namely, the HomeController.
You should check that you are following the default conventions (if you have it set up that way)
Controllers belong in the Controllers folder and follow the naming convention [Name]Controller.
Also, every action in the controller must be public and must return an ActionResult of some kind. Returning a View will cause a particular View to be rendered.
Also, Views follow the folder structure View/[ControllerName]/[Action].aspx
The fact that the first page loads means you probably have Home/Index set up properly for both your Controller and your View. You should take a look at those and see what the difference between that is and the other controllers/actions/views that you've set up.