How to set a picture programmatically in a NavBar?

You can set backGround image to navigationBar Using this Put in didFinishLaunchingWithOptions [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@”title_bar.png”] forBarMetrics:UIBarMetricsDefault]; Or you can set navigation bar image in any view using UINavigationBar *navBar = [[self navigationController] navigationBar]; UIImage *image = [UIImage imageNamed:@”TopBar.png”]; [navBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault]; Or you can set a view on your NavigationBar Link [[UINavigationBar appearance] addSubview:yourView]; … Read more

swiftui how to fetch core data values from Detail to Edit views

Here is a simplified version of your code Just paste this code into your project and call YourAppParent() in a body somewhere in your app as high up as possible since it creates the container. import SwiftUI import CoreData //Class to hold all the Persistence methods class CoreDataPersistence: ObservableObject{ //Use preview context in canvas/preview let … Read more

Send data from TableView to DetailView Swift

Here is the example for you: var valueToPass:String! func tableView(tableView: UITableView!, didSelectRowAtIndexPath indexPath: NSIndexPath!) { println(“You selected cell #\(indexPath.row)!”) // Get Cell Label let indexPath = tableView.indexPathForSelectedRow! let currentCell = tableView.cellForRowAtIndexPath(indexPath)! as UITableViewCell valueToPass = currentCell.textLabel.text performSegueWithIdentifier(“yourSegueIdentifer”, sender: self) } override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?){ if (segue.identifier == “yourSegueIdentifer”) { // initialize new view … Read more

Pass data through segue

Swift works exactly the same way as Obj-C but is reworked in the new language. I don’t have a lot of information from your post but let’s give a name to each TableViewController to help with my explanation. HomeTableViewController (this is the screenshot you have above) PlayerTableViewController (this is the player screen you want to … Read more