Welcome, Guest
Username Password: Remember me

Intro Video Question (I have gone astray)
(1 viewing) (1) Guest

TOPIC: Intro Video Question (I have gone astray)

Intro Video Question (I have gone astray) 1 year, 1 month ago #1

First, mere words cannot express how awesome your product is.

My selectionCell behaves differently than the one in the video. In my version, three things are different:

- The Navigation Bar has two Buttons, 1. "Cancel" on the Left and 2. "Done" on the Right
- When I return to the Main Detail View (where the TextView and Slider appear), my selection isn't there, but your selection is.

Code
//
// RootViewController.m
// Sensible App
//
// Created by Imaginative on 4/16/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
 
#import "RootViewController.h"
 
@implementation RootViewController
 
#pragma mark -
#pragma mark View Lifecycle
 
- (void) viewDidLoad {
 
[super viewDidLoad];
 
tableViewModel = [[SCTableViewModel alloc] initWithTableView: self.tableView withViewController: self];
 
SCTableViewSection *section = [SCTableViewSection sectionWithHeaderTitle:@"Section Header"];
[tableViewModel addSection: section];
 
[section addCell:[SCTextFieldCell cellWithText: @"TextField"]];
[section addCell:[SCSliderCell cellWithText: @"Slider"]];
[section addCell:[SCSwitchCell cellWithText :@"Switch"]];
 
NSArray *selectionItems = [NSArray arrayWithObjects: @"Item 1", @"Item 2", @"Item 3", nil];
 
SCSelectionCell *selectionCell = [SCSelectionCell cellWithText:@"Select"];
selectionCell.items = selectionItems;
 
[section addCell:selectionCell];
}
 
- (void)dealloc {
 
[tableViewModel release];
[super dealloc];
}
 
@end
  • Franklin
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0

Re: Intro Video Question (I have gone astray) 1 year, 1 month ago #2

Thank you so much Franklin for all the complements


The Navigation Bar has two Buttons, 1. "Cancel" on the Left and 2. "Done" on the Right


Yes, this is the new behavior that is adopted by STV 2.0, where the user is allowed to cancel their selection for greater flexibility and better user experience.


When I return to the Main Detail View (where the TextView and Slider appear), my selection isn't there, but your selection is.


This is because the cells in the intro video were bound to an object property where the selection gets automatically saved to. Do you want to use the cells without binding them to anything?
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
Last Edit: 1 year, 1 month ago by tarekskr.

Re: Intro Video Question (I have gone astray) 1 year, 1 month ago #3

Hmm...I'm only at the 10:00 minute mark in the video. I might have to view the whole 31:00 minutes before I answer that.
  • Franklin
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0

RootViewController and Task Object might not be Connected 1 year, 1 month ago #4

Thanks to your advice, I switched to version 1. SCSelectionCell worked like a charm after that.

New Challenge
I've been working on this since 3:00AM - 7:00AM this morning (time index 10:00 to 10:20). I'm having trouble getting the logTask function to work.

Attachment SensibleApp.zip not found

  • Franklin
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
Last Edit: 1 year, 1 month ago by tarekskr.

Re: RootViewController and Task Object might not be Connected 1 year, 1 month ago #5

Hi Franklin,

Since this forum is public domain, please don't post any projects containing any STV files (you can just remove the STV files before compressing the project folder). Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
Last Edit: 1 year, 1 month ago by tarekskr.

Re: RootViewController and Task Object might not be Connected 1 year, 1 month ago #6

Sorry about that.
  • Franklin
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
Time to create page: 1.00 seconds