Passing data into a table view controller from a menu selection in a storyboard

Passing data into a table view controller from a menu selection in a storyboard

Content Index :

Passing data into a table view controller from a menu selection in a storyboard
Tag : objective-c , By : bdurbin
Date : January 11 2021, 03:32 PM

seems to work fine I believe the right way to get the data to your view controller is to use the prepareForSegue:sender: function from the originating view controller. If you implement this function in the view controller where you have your menu, it will be called right before control is transferred to the new view controller.
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue.destinationViewController isKindOfClass:[TableViewController class]]) {
        TableViewController *vc = (TableViewController *)segue.destinationViewController;
        vc.data = info;
- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender {
    if ([identifier isEqualToString:@"SegueA"] && !self.allValuesGood)
        return NO;

    return YES;

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Passing data from a Table View Controller to a Detail View Controller

Tag : ios , By : BooTeK
Date : March 29 2020, 07:55 AM
Hope this helps why dont you just pass a image like--
dvc.image=[UIImage imageNamed:[self.foodImgArray objectAtIndex:indexPath.row]];

Passing to correct view controller on table view datasource selection

Tag : ios , By : Hitesh Prajapati
Date : March 29 2020, 07:55 AM
wish helps you In didSelectRowAtIndexPath, you need to keep condition based on login or not , like you did in moreScreenElements method
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
      [tableView deselectRowAtIndexPath:indexPath animated:YES];
      if ([VCConfiguration isUserAlreadyLoggedIn]) {
         //Here you can write code for selecting MoreScreenOptionsData plist table cell
      } else {
          //Here you can write code for selecting Guest_More plist table cell 

Passing data from a table view controller to a another view controller contained within tab view?

Tag : ios , By : WellBeing
Date : March 29 2020, 07:55 AM
I wish this help you Since they don't need to be persisted, the simplest solution would be to use a singleton that will hold the selected Jobs in an array that you can retrieve from the e-mail VC when it appears.
final class SelectedJobs {

static let shared = SelectedJobs()

var jobsArray = [Job]()
 class EmailVC: UIViewController {
    var selectedJobs = [Job]()

    override func viewWillApear(_ animated: Bool) {

         for job in SelectedJobs.shared.jobsArray {



Passing data from view controller to table view controller in ios swift 2

Tag : ios , By : JoeCh
Date : March 29 2020, 07:55 AM
This might help you You have to declare String variable in your 3rd View Controller (Table View Controller) like
var myString: String = ""

override func viewDidLoad() {
let DestViewController:tableviewcontroller = segue.destinationViewController as! tableviewcontroller
DestViewController.myString = labelText.text!
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
    let cell1 = tableView.dequeueReusableCellWithIdentifier("cell1", forIndexPath: indexPath)
    cell1.textLabel!.text = myString
    return cell1
DestViewController.passdata = tblLable.text! //In first View Controller
cell1.textLabel!.text = tblLable.text! //In second View controller

Conveniently convert a View Controller object to Table View Controller during design time (Storyboard)

Tag : xcode , By : new Blackberry devel
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • NSString with \n or line break
  • how do i know when to use a datasource or delegate protocol when using a UI object in my project?
  • Building Dynamic Classes in Objective C
  • Embed font in a mac bundle
  • When to retain a "delegate"
  • NSString sizeWithAttributes: Inaccuracy
  • Attributed strings in UITableViewCells without WebView?
  • Printing an invisible NSView
  • target-action uicontrolevents
  • setSelectsInsertedObjects on NSArrayController not actually selecting
  • Objective-C function with default parameters?
  • Help needed with drawRect:
  • Modulo operator in Objective-C returns the wrong result
  • Create class diagram from already existent iphone code
  • Cocoa Touch. Why does NSNumber return a difference value for intValue and floatValue?
  • Using MAX with unsigned long and unsigned long subtraction
  • UINavigationController: pushViewController not working in iOS 13, remains on same page
  • Getting 'unrecognized selector sent to instance' with PDFDocument initWithData?
  • FMDB/SQLCipher and FMDBMigrationManager migration fails
  • Why RunLoop doesn't block the whole thread from executing?
  • How to get the sunrise/ sunset time for remote location in their timezone, not device timezone when using open weather a
  • How to append a NULL into the char array?
  • Objective-C: order of signalling of GCD semaphores
  • Using a Swift extension method in Objective-C
  • How to convert HEXString (NSString) to ByteArray Objective-C
  • Cannot install Swift cocoapod without use_frameworks! module-swift.h file not found
  • shouldPerformSegueWithIdentifier always executed first
  • How to make a Swift enum available in Objective-C?
  • VSCode show `unrecognized token` for Objective-C header file
  • How to get data out of a block?
  • How to fix Zombie Object throwing 'EXC_BAD_INSTRUCTION' when calling show window
  • How to keep checking a value until it changes without using infinite loop?
  • (Objective-C++) Testing float value causes infinite loop
  • Use of macro with condition in swift
  • How to stop sending requests to dispatch_async requests for ringing?
  • Implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int'
  • Diffable data source for TableView error on iOS 13: Inconsistent associations for moves
  • Objective C: How to get access token from web browser to cocoa app?
  • App crashes while converting to Objective-C ARC
  • When updating the TestFlight SDK do you need to delete the old version?
  • Issue overriding the default constructor of the UIButton Class?
  • NSData to NSArray of UInt16 in Objective C
  • How to read file by sector,and not rely on the OS cache in Cocoa
  • Why doesn't strlen() return the correct number of bytes here?
  • Why the main queue in iOS has to be a serial dispatch
  • AWS API Gateway unreliability in refresh
  • Sending dictionary from a VC to another VC through Custom delegtes
  • Convert from NStimeInterval to CMTime accurately
  • How can I continue my count from the correct spot once I load the saved count?
  • instance method 'connect:' not found (return type defaults to 'id'
  • Does an object initialize automatically if it is the synthesized property of another object?
  • Algorithm to group consecutive words minimizing length per group
  • Unable to add UIScrollView to UITableView
  • What reasons are there to pass an argument to an initializer in objective C?
  • NSLogging UILabel's text outputs null
  • undefined reference to '__objc_class_name_Fraction'
  • NSOutlineview with checkbox
  • Accessing Property from another NSObjectClass
  • Implementing background worker - Obj C/Cocoa
  • Move UIView above UITableView when user Scrolls Down
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com