RedPark TTL Cable ReadBytesData - unable to get any data - iphone

I have two UILabels, info and receiving. Receiving is suppose to tell me that I am actually receiving data. However, when it does indicate that.... my info UILabel is not being updated accordingly. It sometimes works and sometimes does not work..
What is up with that?
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
[super viewDidLoad];
receiving = [[UILabel alloc] initWithFrame: CGRectMake(30,50,255,100)];
info = [[UILabel alloc] initWithFrame: CGRectMake(30,200,255,100)];
info.backgroundColor = [UIColor orangeColor];
receiving.backgroundColor = [UIColor orangeColor];
// [self.view addSubview: toggleSwitch];
receiving.text = #"Not Receiving...";
[self.view addSubview: info];
[self.view addSubview: receiving];
}
return self;
}
- (void) startCommThread:(id)object
{
// NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// initialize RscMgr on this thread
// so it schedules delegate callbacks for this thread
rcsMgr = [[RscMgr alloc] init];
[rcsMgr setDelegate:self];
// run the run loop
[[NSRunLoop currentRunLoop] run];
// [pool release];
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Create and start the comm thread. We'll use this thread to manage the rscMgr so
// we don't tie up the UI thread.
if (commThread == nil)
{
commThread = [[NSThread alloc] initWithTarget:self
selector:#selector(startCommThread:)
object:nil];
[commThread start]; // Actually create the thread
}
}
- (void) readBytesAvailable:(UInt32)numBytes {
receiving.text = #"Receiving...";
NSString* str = [rcsMgr getStringFromBytesAvailable];
if ( str ) receiving.text = #"I GOT SOMETHING!";
// if ( numBytes ) receiving.text = numBytes;
else receiving.text = #"Still Receiving...";
info.text = str;
}

Here's my best shot at an answer, with the caveat that I've never used RedPark's cable or SDK. My hunch is that -readBytesAvailable: is called by the RscMgr on the same background thread used to set it up. You can't use UIKit objects on background threads. You need transfer that work back to the main thread/queue something like this:
- (void)readBytesAvailable:(UInt32)numBytes
{
NSString* str = [rcsMgr getStringFromBytesAvailable];
dispatch_async(dispatch_get_main_queue(), ^{
if (str) {
receiving.text = #"I GOT SOMETHING!";
} else {
receiving.text = #"Still Receiving...";
}
info.text = str;
});
}
Also, you should have an autorelease pool on your commThread. Why did you comment it out?

Related

Core data random crash

I finished the development of my app but at this point I face random crashes when I try to save an image in core data.
Here is the console message:
CoreData: error: Serious application error. Exception was caught
during Core Data change processing. This is usually a bug within an
observer of NSManagedObjectContextObjectsDidChangeNotification.
-[_PFExternalReferenceData compare:]: unrecognized selector sent to instance 0x94b69b0 with userInfo (null)
The problem is that it is non deterministic. It happens more or less once out of 5 times.
Would anyone have an idea where I should look for ?
EDIT:
Here is the code of my class that seems to pose a problem. It happens sometimes when I click on the save button, calling -(IBAction)saveResultingImage:
#import "ResultViewController.h"
#interface ResultViewController ()
#property (nonatomic)BOOL resultSaved;
#end
#implementation ResultViewController
#pragma mark - IBActions
- (IBAction)saveResultingImage
{
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, NO, 0.0);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
_resultImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
_resultSaved = [self saveOnCoreData];
[self performSegueWithIdentifier:#"BackToStartSegue" sender:self];
}
- (IBAction)discardWithoutSaving
{
[self performSegueWithIdentifier:#"BackToStartSegue" sender:self];
}
- (IBAction)restartDrawing:(id)sender
{
UIImage *backgroundImage = _subImage;
UIImageView *imageView =
[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, backgroundImage.size.width, backgroundImage.size.height)];
imageView.image = backgroundImage;
[self.view addSubview:imageView];
UIImage *maskImage = _maskImage;
CGRect maskViewRect = CGRectMake(0, 0, maskImage.size.width, maskImage.size.height);
ImageMaskView *subView = [[ImageMaskView alloc] initWithFrame:maskViewRect image:maskImage];
[self.view addSubview:subView];
}
- (IBAction)showExplainVC
{
[self performSegueWithIdentifier:#"ShowInfoSegue" sender:self];
}
#pragma mark - Methods
- (BOOL)saveOnCoreData
{
NSManagedObjectContext *context = [self managedObjectContext];
NSManagedObject *newMeme =
[NSEntityDescription insertNewObjectForEntityForName:#"Meme" inManagedObjectContext:context];
NSData *toSaveMeme = UIImagePNGRepresentation(_resultImage);
[newMeme setValue:toSaveMeme forKey:#"image"];
NSError *error = nil;
if (![context save:&error]) {
DebugLog(#"Can't save: %# %#", error, [error localizedDescription]);
return NO;
}
return YES;
}
#pragma mark - View Controller LifeCycle
- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender
{
if ([identifier isEqualToString:#"BackToStartSegue"]) {
return _resultSaved;
}
return _resultSaved;
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO];
DebugLog(#"Called viewWillAppear");
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
}
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
UIBarButtonItem *discardBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:#"Discard" style:UIBarButtonItemStylePlain target:self action:#selector(discardWithoutSaving)];
UIBarButtonItem *saveBarButtonItem =
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:#selector(saveResultingImage)];
UIBarButtonItem *infoBarButton =
[[UIBarButtonItem alloc] initWithTitle:#"How to" style:UIBarButtonItemStylePlain target:self action:#selector(showExplainVC)];
discardBarButtonItem.style = UIBarButtonItemStyleBordered;
self.navigationItem.rightBarButtonItems = #[saveBarButtonItem, discardBarButtonItem, infoBarButton];
self.view.backgroundColor = [UIColor blackColor];
[self restartDrawing:nil];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - Core Data Stack
- (NSManagedObjectContext *)managedObjectContext
{
NSManagedObjectContext *context = nil;
id delegate = [[UIApplication sharedApplication] delegate];
if ([delegate performSelector:#selector(managedObjectContext)]) {
context = [delegate managedObjectContext];
}
return context;
}
#end
Thanks for showing interest :-)

How to reset all tableView data and arrays when click of UIButton?

I have 1 tabbarcontroller have Login and Complete Tab. I want to click on Logout button in LoginTab, all data and tableview in COmplete tab is reset. I used this code but it not work:
In CompleteTab.m:
-(void) viewDidLoad
{
temp = [[NSMutableArray alloc] init];
iduploadArray= [[NSMutableArray alloc] init];
FileCompletedArray = [[NSMutableArray alloc] init];
DiffArr= [[NSMutableArray alloc] init];
_tableView = [[UITableView alloc] initWithFrame:self.view.bounds];
tableData = [[NSArray alloc] initWithObjects:FileCompletedArray,nil];
// [_tableView setAllowsSelection:YES];
//tableView.dataSource = self;
// [self.view addSubview:tableView];
// [self parseXMLFile:#"x"];
NSURL *url1 = [NSURL URLWithString:#"server.com"];
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL: url1] ;
....
temp = [FileCompletedArray mutableCopy];
_tableView.dataSource = self;
_tableView.delegate=self;
[self.view addSubview:_tableView];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(#"error: %#", error);//: %#", operation.responseString);
}
];
[httpClient enqueueHTTPRequestOperation:operation];
}
-(void) resetAll
{
[temp removeAllObjects];
[FileCompletedArray removeAllObjects];
[DiffArr removeAllObjects];
[_tableView reloadData];
}
In LoginTab.m:
- (IBAction)LogoutButton:(id)sender {
login = false;
username.hidden = NO;
pass.hidden = NO;
LoginButton.hidden = NO;
LogoutButton.hidden = YES;
//make all the arrays get reset
username.text =#"";
pass.text = #"";
[completeview resetAll];
}
I debug: when I click on Logout button,it called resetAll() function but each variable is 0x000000. So it cannot reset data and reload tableview. Can you help me? Thanks
Since the logout button is in loginTab, it doesnot have any reference to your completeTab. So you need to keep the completeTab reference some where in your app. Best choice is in appDelegate. Then on logout button click, take this instance and reset all data.
Keep your completab view controller instance in AppDelegate like this
#property (nonatomic, retain) UIViewController *completeTab;
self.completeTab = \\Your complete tab viewcontroller instance.
Then on logout button click
[(AppDelegate *)[[UIApplication sharedApplication] delegate].completTab resetAll]
Hope this helps.
Use the selector to call the reset method like this
[completeview performSelector:#selector(resetAll)];
Please create sample project with Tabbased Application.
====== AppDelegate.m ======
#import "LoginTab.h"
#import "CompleteTab.h"
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
UIViewController *viewController1 = [[[LoginTab alloc] initWithNibName:#"LoginTab" bundle:nil] autorelease];
UIViewController *viewController2 = [[[CompleteTab alloc] initWithNibName:#"CompleteTab" bundle:nil] autorelease];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
self.tabBarController.viewControllers = #[viewController1, viewController2];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
return YES;
}
#end
====== LoginTab.m ======
#implementation LoginTab
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.title = NSLocalizedString(#"LoginTab", #"LoginTab");
self.tabBarItem.image = [UIImage imageNamed:#"LoginTab"];
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)LogoutButton:(id)sender {
// Post Notification to CompleteTab Class
[[NSNotificationCenter defaultCenter]
postNotificationName:#"resetAll"
object:self];
}
====== CompleteTab.m ======
#implementation CompleteTab
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.title = NSLocalizedString(#"CompleteTab", #"CompleteTab");
self.tabBarItem.image = [UIImage imageNamed:#"CompleteTab"];
}
[[NSNotificationCenter defaultCenter] addObserver:self
selector:#selector(resetAll:)
name:#"resetAll"
object:nil];
return self;
}
- (void) dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
- (void) resetAll:(NSNotification *) notification
{
NSLog(#"Reset All Called");
}
I am able to call resetAll method of CompeteTab using NSNotification Concept. Please follow this code.
I'd also recommend you check out the free Sensible TableView framework as it has such restting functionality out of box.
As for the method [tableView reloadData] : The table view's delegate or data source calls this method when it wants the table view to completely reload its data. It should not be called in the methods that insert or delete rows, especially within a block implemented with calls to beginUpdates and endUpdates.
I believe you are calling the reloadData in resetAll which is updating the FileCompletedArray which provides the dataSource for the table. Can you call it from somewhere else.

iphone, if I can' populate in the thread function, how can i exit?

I've added my database populate code to the thread method. However, sometimes they may not be any data to show in the graph. I don't want to run the query twice, once before to check if theres any data and I don't want to pre-populate the graph points prior to the thread function.
I've marked where I have my populate code with HERE below.
I think my only option is to exit the thread function, but I'm a little concerned and I want to do this correctly, what do i need to do ?
#import "GraphController.h"
#implementation GraphPoint
- (id) initWithID:(int)pkv value:(NSNumber*)number{
if(self = [super init]){
pk = pkv;
value = [number retain];
}
return self;
}
- (NSNumber*) yValue{
return value;
}
- (NSString*) xLabel{
return [NSString stringWithFormat:#"%d",pk];
}
- (NSString*) yLabel{
return [NSString stringWithFormat:#"%d",[value intValue]];
}
#end
#implementation GraphController
- (void)viewDidLoad{
[super viewDidLoad];
graph.title.text = #"Graph View";
[graph setPointDistance:15];
indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
CGRect r = indicator.frame;
r.origin = self.view.bounds.origin;
r.origin.x = self.view.bounds.size.width / 2 - r.size.width / 2;
r.origin.y = self.view.bounds.size.height / 2 - r.size.height / 2;
indicator.frame = r;
[self.view addSubview:indicator];
[indicator startAnimating];
data = [[NSMutableArray alloc] init];
[NSThread detachNewThreadSelector:#selector(thread) toTarget:self withObject:nil];
}
- (void) thread{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
//HERE
srand([[NSDate date] timeIntervalSince1970]);
for(int i=0;i<100;i++){
int no = rand() % 100 + i;
GraphPoint *gp = [[GraphPoint alloc] initWithID:i value:[NSNumber numberWithFloat:no]];
[data addObject:gp];
[gp release];
}
[self performSelectorOnMainThread:#selector(threadComplete) withObject:nil waitUntilDone:NO];
[pool drain];
}
- (void) threadComplete{
[indicator stopAnimating];
[self.graph setGraphWithDataPoints:data];
self.graph.goalValue = [NSNumber numberWithFloat:30.0];
self.graph.goalShown = YES;
[self.graph scrollToPoint:80 animated:YES];
[self.graph showIndicatorForPoint:75];
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[data release];
[indicator release];
[super dealloc];
}
#end
I'm using Tapku Graph http://duivesteyn.net/2010/03/07/iphone-sdk-implementing-the-tapku-graph-in-your-application/?utm_source=twitterfeed&utm_medium=twitter
To close the thread, just return from the thread method. But don't forget to call [pool release]; (please use it instead of [pool drain]; at the end of your method as well; on iOS where there's no GC they are the same but if Apple one day decides to add GC support they're different).
So it's something like this:
if (wantToCloseThread) {
// Release everything we've allocated.
[pool release];
// Also, if you alloc'ed something that is not autoreleased
// you should release it here.
return;
}
An alternative is to use goto (yes, its use for this is OK):
- (void) thread {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
...
if (something)
goto out;
...
if (somethingElse)
goto out;
...
out:
// Cleanup.
[pool release];
// Also, if you alloc'ed something that is not autoreleased
// you should release it here.
}
This way, you have to write the cleanup only once and the goto ensures that every time you want to actually leave the thread, the complete cleanup is done.

I don't know why my view is freezing

I have a big problem since a few days that I can't solve.
First I have a login view controller with this code :
#implementation MMConnectionViewController
#synthesize login, password, activityIndicator, mainVC;
- (BOOL)textFieldShouldReturn:(UITextField *)aTextField
{
[aTextField resignFirstResponder];
[self performSelectorOnMainThread:#selector(startRolling) withObject:nil waitUntilDone:NO];
[NSThread detachNewThreadSelector:#selector(connect) toTarget:self withObject:nil];
return YES;
}
- (void)viewWillAppear:(BOOL)flag {
[super viewWillAppear:flag];
[login becomeFirstResponder];
login.keyboardAppearance = UIKeyboardAppearanceAlert;
password.keyboardAppearance = UIKeyboardAppearanceAlert;
[self setTitle:#"Monaco Marine"];
UIBarButtonItem *backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:#"Logout"
style:UIBarButtonItemStyleBordered
target:nil
action:nil];
self.navigationItem.backBarButtonItem = backBarButtonItem;
[[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackOpaque];
[backBarButtonItem release];
}
- (void)connect {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
mainVC = [[MMMainViewController alloc] initWithLogin:login.text password:password.text connectPass:#"1" navigationController:self.navigationController nibName:#"MMMainViewController" bundle:nil];
if (mainVC) {
[self performSelectorOnMainThread:#selector(dataLoadingFinished) withObject:nil waitUntilDone:YES];
}
[pool release];
}
- (void)dataLoadingFinished {
self.stopRolling;
[self.navigationController pushViewController:mainVC animated:YES];
}
- (void)showAlertWithMessage:(NSString *)message {
self.stopRolling;
NSLog(#"%#",message);
UIAlertView *warning = [[UIAlertView alloc] initWithTitle:#"Connection Failed" message:[NSString stringWithFormat:#"%#",message] delegate:self cancelButtonTitle:#"Retry" otherButtonTitles:nil];
[warning show];
[warning release];
}
- (void)startRolling {
[activityIndicator startAnimating];
}
- (void)stopRolling {
[activityIndicator stopAnimating];
}
- (void)viewDidLoad {
[login becomeFirstResponder];
}
- (void)dealloc {
[login release],login=nil;
[password release],password=nil;
[activityIndicator release],activityIndicator=nil;
[super dealloc];
}
After, there's MMMainViewController with this code :
#implementation MMMainViewController
#synthesize login, password, connectPass, navigationController, accountVC;
- (void)viewDidLoad {
// Set a title for each view controller. These will also be names of each tab
accountVC.title = #"Account";
accountVC.tabBarItem.image = [UIImage imageNamed:#"icon_user.png"];
self.view.frame = CGRectMake(0, 0, 320, 480);
// Set each tab to show an appropriate view controller
[self setViewControllers:
[NSArray arrayWithObjects:accountVC, nil]];
[navigationController setNavigationBarHidden:NO animated:NO];
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:#"Menu"
style:UIBarButtonItemStyleBordered
target:nil
action:nil];
self.navigationItem.backBarButtonItem = backButton;
[backButton release];
[self setTitle:#"Menu"];
}
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithLogin:(NSString *)l password:(NSString *)p connectPass:(NSString *)c navigationController:(UINavigationController *)navController nibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
contentView.backgroundColor = [UIColor whiteColor];
self.view = contentView;
[contentView release];
login = l;
password = p;
connectPass = c;
navigationController = navController;
if (!accountVC)
accountVC = [MMAccountViewController alloc];
[self.accountVC
initWithNibName:#"MMAccountViewController" bundle:nil];
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
return self;
}
- (void)dealloc {
[connectPass release];
[login release];
[password release];
[super dealloc];
}
The layer MMAccountViewController loaded from MMMainViewController is a basic view controller with nothing in it.
Now the problem is that sometimes when load my tabbed view controller and I go back to the login view controller, the screen freezes and bug with message (NSZombieEnabled = YES) :
*** -[CALayer retain]: message sent to deallocated instance 0xd0199d0
This is all I have and I really can't see where I'm wrong.
Some more idea?
Thanks for those who help me!
You are overreleasing something somewhere. You might want to run your application in Instruments to check where it may be happening (XCode: Run->Run With Performance Tool->Leaks will give you the setup that you need afaik). I can't see anything in your code, but you said yourself that you use "roughly" this code, so it may not be in this part of your program.
Update:
I still can't see that you overrelease something somewhere... I'm pretty sure the problem is not within this part of the code. If you haven't found the problem yet, you may want to try and create a test case, that is, a small program that tries to mimic this programs behavior and reproduce the bug. If you can reproduce it within a small program, I'll take a look at that.
I was also encounter the same problem, and the problem was that I was assigning a UIButton to the rightNavigationItem and release that button instance, I just remove the release code and started working.

Why does my TTTableViewController not appear

I have an application which contains a scrollview with two subviews (to scroll left and right between them)
Both views appear correctly and scrolling between the views worked fine. Now I want to change the first view to be a TTTableView (courtesy of Three20) but when I use the class 'TableControlsTestController' from the TTCatalog application all I see is an empty tableView
Note that this class contains all the data to display 6 cells
To add the new TTTableView I use the following
[scrollView addSubview:detailView.view];
where detailView is the instance of TableControlsTestController
To try and narrow down where the problem is I also tried calling
[self presentModalViewController:detailView animated:YES];
This correctly displays the tableview with the 6 cells.
Why when I try to add the view to the scrollView does this not work as I expect?
For reference if you do not have access to the TTCatalog
#import "TableControlsTestController.h"
///////////////////////////////////////////////////////////////////////////////////////////////////
#implementation TableControlsTestController
///////////////////////////////////////////////////////////////////////////////////////////////////
// NSObject
- (id)init {
if (self = [super init]) {
self.tableViewStyle = UITableViewStyleGrouped;
self.autoresizesForKeyboard = YES;
self.variableHeightRows = YES;
UITextField* textField = [[[UITextField alloc] init] autorelease];
textField.placeholder = #"UITextField";
textField.font = TTSTYLEVAR(font);
UITextField* textField2 = [[[UITextField alloc] init] autorelease];
textField2.font = TTSTYLEVAR(font);
textField2.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
TTTableControlItem* textFieldItem = [TTTableControlItem itemWithCaption:#"TTTableControlItem"
control:textField2];
UITextView* textView = [[[UITextView alloc] init] autorelease];
textView.text = #"UITextView";
textView.font = TTSTYLEVAR(font);
TTTextEditor* editor = [[[TTTextEditor alloc] init] autorelease];
editor.font = TTSTYLEVAR(font);
editor.backgroundColor = TTSTYLEVAR(backgroundColor);
editor.autoresizesToText = NO;
editor.minNumberOfLines = 3;
editor.placeholder = #"TTTextEditor";
UISwitch* switchy = [[[UISwitch alloc] init] autorelease];
TTTableControlItem* switchItem = [TTTableControlItem itemWithCaption:#"UISwitch" control:switchy];
UISlider* slider = [[[UISlider alloc] init] autorelease];
TTTableControlItem* sliderItem = [TTTableControlItem itemWithCaption:#"UISlider" control:slider];
self.dataSource = [TTListDataSource dataSourceWithObjects:
textField,
editor,
textView,
textFieldItem,
switchItem,
sliderItem,
nil];
}
return self;
}
#end
It turns out that some of the events were not being propagated through the scrollView and therefore not handled in the TTTableViewController. To fix this I had to do the following in my scrollView
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[myNewTTViewController viewWillAppear:NO];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[myNewTTViewController viewDidAppear:NO];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[myNewTTViewController viewWillDisappear:NO];
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[myNewTTViewController viewDidDisappear:NO];
}
As soon as I did this the table popped into life