How to add a URL link using storyboard - xcode

I have created via Storyboard, a Navigation Controller connected to a Table View Controller where each table cell is linked to a different View Controller. One one of these View Controller I would like to put a URL, can I do this in Storyboard ?
Thank you.

You mean you want to click on one table cell so it takes you to a website directly outside of your app ? or to a web view inside your app ?
Since you're asking about a way to do this using Storyboard, I suggest putting a WebView inside your View Controller.

Related

Using container view with Xamarin and MVVMCross

I am trying to use a Container View within a View Controller (Free Form View) to reuse some components that are common for two views. So far I have a View Controller (Free Form View) with a Ui View and a Container View. Upon opening up the Free Form View, Container View should contain Free Form Purchase View, but when pressing the blue Button, that View should be replaced with the View last View Controller. I have a similar setup for Android where I use Fragments.
I am looking for the best way to navigate between the controllers. I use MVVMCross throughout the application, but I am open to other suggestions that does not involve MVVMCross.
you need to create your own controller which handles swapping of Views in Container View through custom Segue implementation.
You can find detailed step how to do this from Richard Woollcott post: Using the ContainerView to Transition between Views - aka More Fragments in Xamarin.iOS

iOS5: Relationship Segues and Tabs without using UITabBar

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.

Return View From Controller in Area Not Working

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

Disconnected view from View in interface builder iOS

I am working on my signInViewController.xib file and I accidentally disconnected the view from View in files owner. How do I fix this?
You mean you accidentally disconnected the view from the View Controller, yes?
If that's the case, control drag from the View Controller object to your view and one of the connections you can make is the View one.
If you actually mean that the File Owner for the XIB is no longer the View Controller, go to the Attributes Inspector for the File Owner and set the "Custom Class" attribute to the name of your View Controller class.
A nice visual description of the architecture is in this Apple documentation, in Figure 2-4.
Hope this info helps!

Adding a UINavigationController built with IB

Building an iPhone application. The delegate loads a SplashScreenView which sits there until the user taps the screen. When the user is done tapping the screen, I release that view and I want to load my custom Navigation Controller. I can't figure out how to load the Navigation Controller I designed in IB...it's currently loading a blank instance of UINavigationController.
I'm running this from my delegate:
mnc = [[MyNavigationController alloc] initWithNibName:#"MyNavigation" bundle:nil];
[self.window addSubview:mnc.view];
MyNavigation is a XIB I created which only has File's Owner/First Responder/a Navigation Controller I added. I set the class of File's Owner to MyNavigationController but I'm not sure how to tell it that I want the view "MyNavigationController" uses to be the one I designed. When I try to drag the "view" outlet of File's Owner in IB to my designed Navigation Controller, it doesn't seem to like it.
I'm just not sure how to connect the dots here. Any help would be incredibly appreciated.
What is the root controller of your navigation controller? The "blank" thing that you see is probably your navigation controller loaded with no controllers for it to navigate.
Update
You don't need "two controllers" per se. It's just that navigation controller is the one that controls the stack of other controllers you provide it with. First you init your navigation controller with root view controller (with initWithRootViewController method you mentioned), then you can push (pushViewController:animated:) or pop (popViewController:animated:) other controllers to or off of the stack of navigation controller.
Apple developer documentation provides plenty information in view controller programming guide on how different types of view controllers interact.

Resources