UA-17470720-3

Jump to content


Most Liked Content


#10442 STV 4.0 Sneak Preview: Interface Builder Integration

Posted by Tarek on 11 March 2014 - 02:57 AM

Dear all,

 

We feel ecstatic today to share with you a sneak preview of our upcoming STV 4.0 Interface Builder integration. Using our own custom objects in Interface Builder's object library, we're now able to re-create our classic Tasks App without using a single line of code! :)

 

Please checkout our latest video preview and let us know what you think:

 


  • poffel, rkelly99, Everett and 6 others like this


#9306 iOS 7 and STV

Posted by Tarek on 10 June 2013 - 10:25 PM

Dear all,

 

As you all know, Apple officially announced iOS 7 earlier today. As expected, the new release makes drastic changes to how the UI is rendered, amongst several other UX changes.

 

We are happy to announce that we've tested STV with iOS 7 and found that it already supports it out of the box. This is mainly because we have always made sure we design STV to only use native UIKit controls, and never made any assumptions about control renderings or sizes. Of course, further tests might show some areas that require further tweaking, but for the most part, your STV 3.0 apps should get an immediate facelift as soon as they run on iOS 7.

 

Finally, we will keep you updated during the coming few weeks with our plans for STV 4.0, and our support for all the exciting new iOS 7 features. We have a very exciting roadmap ahead, and we can't wait to share everything with you guys! :)

 

Thank you very much for all your support!

 

Tarek

 

 

P.S. We're resuming forum support as soon as WWDC is over. Please excuse any delays.


  • David DelMonte, Michael Heger, Everett and 5 others like this


#9506 Using STV Pro with CocoaPods

Posted by Anh Do on 07 July 2013 - 08:31 PM

I've been having trouble getting STV 3.2.1 to work with CocoaPods, as I also use AFNetworking in my project, and including STV source code creates all sorts of problems. I found this great post on using STV with CocoaPods: http://blog.gaslight...with-cocoapods, but it doesn't cover STV+WebServices.

 

Long story short: I spent sometime looking at Podspec and found a way to make STV+WebServices works:

 

1/ Unzip STV 3.2.1 Pro and put it in your project folder.

2/ Put these in Podfile:

 

platform :ios, '5.0'
inhibit_all_warnings!


pod 'AFNetworking', '~> 1.3.1'


pod 'SensibleTableView', :path => "STV 3.2.1 Pro/Source Code/SensibleTableView/"
pod 'STV+WebServices', :path => "STV 3.2.1 Pro/Source Code/STV+WebServices/"
 

3/ Create new podspec for SensibleTableView in STV 3.2.1 Pro/Source Code/SensibleTableView/SensibleTableView.podspec

 

 

 

Pod::Spec.new do |s|
  s.name = 'SensibleTableView'
  s.version = '3.2.1'
  s.platform = :ios
  s.ios.deployment_target = '5.0'
  s.prefix_header_file = 'SensibleTableView/SensibleTableView-Prefix.pch'
  s.source_files = 'SensibleTableView/STV-Core/*.{h,m}'
  s.requires_arc = true
end
 

4/ Create new podspec for STV+WebServices in STV 3.2.1 Pro/Source Code/STV+WebServices/STV+WebServices.podspec

 

 

Pod::Spec.new do |s|
  s.name = 'STV+WebServices'
  s.version = '3.2.1'
  s.platform = :ios
  s.ios.deployment_target = '5.0'
  s.prefix_header_file = 'STV+WebServices/STV+WebServices-Prefix.pch'
  s.source_files = 'STV+WebServices/*.{h,m}'
  s.exclude_files = 'STV+WebServices/UIImageView+WebServices.{h,m}'
  s.dependency 'JSONKit', '~> 1.5pre'
  s.dependency 'AFNetworking', '~> 1.3.1'
  s.requires_arc = true

  s.subspec "CJSONSerializer" do |sp|
    sp.source_files = ['STV+WebServices/external/CJSONSerializer.{h,m}', 'STV+WebServices/external/JSONRepresentation.h']
    sp.requires_arc = false
  end
end

 

 

 

5/ Open SCWebServiceForceLinkerToLinkCategories.m and comment this line:
 

 

#import "UIImageView+WebServices.m"
 

6/ Run pod install 

 

 


  • Tarek, Michael Heger, Everett and 2 others like this


#8919 STV 3.2.0 has just been released!

Posted by Tarek on 28 April 2013 - 12:13 AM

Dear all,

We're really excited to announce that STV 3.2 is finally out!

STV 3.2 is almost like a major version upgrade if you consider the amount of new features it brings to the STV series. As a matter of fact, it's probably the most feature packed minor version release we've ever had! Let's have a look at some of its awesome new features:


UISearchDisplayController Support

STV now natively supports displaying a UISearchDisplayController during it's automatic search. To enable this in your projects, simply set the new enableSearchDisplayController property to TRUE and STV will take care of everything else!

SCSearchViewController

We've created a new SCViewController subclass called SCSearchViewController. The new view controller automatically provides a UISearchBar control, which saves you the hassle of having to create one yourself when using STV's automatic search features. Using this new class, you can start doing stuff like:

SCSearchViewController *mySearchVC = [[SCSearchViewController alloc] init];
mySearchVC.tableViewModel = myTasksModel;
[self.navigationController pushViewController:mySearchVC animated:YES];

and that's it, the above code is all you now need to provide automatic search functionality for your models! Here is what this new feature combined with our UISearchDisplayController support looks like on our own Custom Cells App:

SCSearchViewController.png



SCObjectSelectionModel

We've now added support for creating object selection models via our new SCObjectSelectionModel class. Using this new class, you'll be able to have your app users automatically categorize and search for objects while selecting them! To have STV use the new class for it's automatically generated selection detail view, simply pass it on in the detailViewController cell action:

myObjSelectionPropertyDef.cellActions.detailViewController = ^UIViewController*(SCTableViewCell *cell, NSIndexPath *indexPath)
{
  SCObjectSelectionModel *objSelectionModel = [SCObjectSelectionModel modelWithTableView:nil];
  // categorize using the first character of the object's title
  objSelectionModel.modelActions.sectionHeaderTitleForItem = ^NSString*(SCArrayOfItemsModel *itemsModel, NSObject *item, NSUInteger itemIndex)
  {
    NSString *objectTitle = (NSString *)[item valueForKey:@"title"];
    // Return first charcter of objectTitle
    return [[objectTitle substringToIndex:1] uppercaseString];
  };

  // Yes, this too makes use of our awesome new SCSearchViewController! :)
  SCSearchViewController *selectionSearchVC = [[SCSearchViewController alloc] init];

  selectionSearchVC.tableViewModel = objSelectionModel;

  return selectionSearchVC;
};



Themes Layout Control

Not only can your beloved themes feature control the 'skinning' of your app, but it can now also control how every single view is laid out! This is tremendously useful when styling table view cells for example, since you can now resize labels or move text fields around using a single really trivial theme file!

To achieve this, we had to re-engineer the theming system and have it kick in at several stages during a cell's life cycle (as you probably know, cell layout for example is only effective inside layoutSubviews). We've also had to add support the CGRect and CGSize data types in the theme file. To give you an example of how powerful this new feature is, here is all the theme code you need to reposition a cell's textLabel and have it drop a dark shadow:

SCTableViewCell
{
  textLabel.frame:  CGRect(10,10,150,30);
  textLabel.shadowColor:  darkGrayColor;
  textLabel.shadowOffset:  CGSize(1,1);
}

Sensible Key Path!

We're all aware of how to access properties deep down the object hierarchy using the valueForKeyPath method. For example, to access a customer's address street name, you'd typically code:

street = [myCustomerObject valueForKeyPath:@"address.street"];

STV has always fully supported this, and will automatically display cell data based on your key path setting. However, a lot of the times you simply cannot use this technique because there is an array in the middle, and Apple's own valueForKeyPath method does not support having an array in the middle of your key path. With our new STV 3.2, we've actually introduced our own key path method that does support arrays! With our new method, you could easily call any of the following:

firstInvoiceDate = [myCustomerObject valueForSensibleKeyPath:@"salesData.invoices[0].date"];
lastInvoiceDate = [myCustomerObject valueForSensibleKeyPath:@"salesData.invoices[n].date"];
beforeLastInvoiceDate = [myCustomerObject valueForSensibleKeyPath:@"salesData.invoices[n-1].date"];
//etc.

This new feature becomes especially essential when you're dealing with web services, as many web services return the value you want STV to automatically fetch deep inside an array or even two in its response JSON object. For example, the YouTube search web service returns three video thumbnails in an array, so you'll then need to tell STV exactly which thumbnail to display using the super convenient bindings string. Using this new feature, the bindings string can now look like this:

// Automatically fetch and display the video's thumbnail, title, and description
NSString *bindingsString = @"1:media$group.media$thumbnail[1].url; 2:media$group.media$title.$t; 3:media$group.media$description.$t";

To see this in action, you can download the full YouTube web services app here. (requires the STV+WebServices framework)




This is a screen shot of the app

YouTube.png


New Web Services Features

STV web services binding has quickly gained amazing popularity amongst the STV user community! Usually with only a single page of code, we're able to have STV automatically talk to the web service and display its results in our own custom cells (again, the YouTube app is an excellent example). We've now pushed this a little bit further with these new features:
  • STV now natively supports automatically encoding the username and password using Base64 encoding, and will automatically set the authorization headers for HTTP basic authentication.
  • STV now natively supports token authentication.
  • STV now supports an additional web services batching system where the batch start index can be specified (useful for batching from web services like YouTube and several others who don't return a next batch URL).
  • Object editing is now optimized to only update the web service store if the edited object has really changed (even if the user taps Done).
And last but not least, STV 3.2 fixes all issues reported (and identified as bugs) in our bug tracking system. Furthermore, it implements many new additional features from our users' feature list requests. For a full change log of STV 3.2, please refer to the file called changelog.txt in your downloaded package.


Please leave us your feedback on the new release, we highly appreciate all your input.

Thank you very much for all your support!
  • cometlinear, Everett, wizgod and 2 others like this


#2211 Add required asterisk to cells

Posted by Tarek on 19 March 2011 - 04:36 PM

Hi Harold,

You must put the code in the didLayoutSubviewsForRowAtIndexPath (SCTableViewModelDelegate) or the didLayoutSubviewsForCell (SCTableViewCellDelegate) methods, as shown here: http://www.sensiblec...cells.html#2094

didLayoutSubviews is the only place where you are able to modify the frames of the cell's subviews. Good luck!
  • Geoffrey Alexander, Patrick Scheips, David DelMonte and 2 others like this


#5803 Not Saving

Posted by Santiago Fabregat on 06 April 2012 - 09:22 PM

Everytime I run the app works perfectly I can create some new cells but when I quit the simulator and relaunch it, the cells I created the last time are gone, how can I make this stop?
NOTE: note that the rest of the app works flawlessly
  • ahl1, Chris Kelleher, Ryan Davis and 1 other like this


#2671 Add Button, SCArrayOfObjectsSection and Core Data

Posted by Tarek on 28 April 2011 - 09:02 PM

Hi Kevin,

You should never need to implement itemCreatedForSectionAtIndex with Core Data, the item should be automatically created for you. Would you please post some of your relevant code and give me more details on the error message you get? Thank you very much!
  • Joe Glenn, carl grainger, wangxing and 1 other like this


#9918 How to Add Custom Cell at the Begining of the TableView

Posted by Dave Guerin on 17 October 2013 - 08:57 AM

Hi wizgod,
 
Instead of:
 

[detailModel addSection:actionSection];

 
try:
 
 

[detailModel insertSection:actionSection atIndex:0];

HTH


  • Tarek, wizgod and mtamburro like this


#13568 Wondering If Any One Is Still Here?

Posted by wizgod on 19 March 2018 - 03:22 PM

Wondering if anyone is still here... I still use sensibletableview in a number of apps, albeit only through code...

 

I still have a few questions, and hope some of you are still around so I can tweek my code...

 

Cheers,

 

John

 

Still here as well, ask away!  :D 

 

I have talked to Tarek and he has moved on to other projects.

 

Apple pretty much shut STV down with their plugin limitations and as a result, "almost all of STV customers abandoned the platform".

 

The framework is still a time/lifesaver for me, even via code, and I have continued to use it in all my projects. Not having the UI plugin was never a show stopper for me; it's life was a small percentage in the STV timeline where the majority was driven by code.

 

Since I have the source, I do have the ability to update if it ever becomes necessary. I'll continue to use it until such time that STV becomes obsolete with some future evolution of IOS/XCode/Swift,

 

I've relayed my interest in putting STV on GitHub, which he appears to be open to, and I'm just waiting to hear back from him.

 

Wg


  • Gerald K., Dave Guerin and designwerks like this


#13354 detailModelShouldDismiss Cancel/Done

Posted by RaduGrama on 24 March 2016 - 09:29 PM

How can you determine in detailModelShouldDismiss is Cancel or Done has been pressed?

 

 

self.tableViewModel.sectionActions.detailModelShouldDismiss = {
    (section, detailModel, indexPath) -> Bool in

    if (detailModel.viewController as! SCTableViewController).doneButtonTapped {
...

 

doneButtonTapped or cancelButtonTapped above always return false. This code is running against Core Data.

 

Thank you,

Radu


  • Tarek, Dave Guerin and wizgod like this


#13317 Migrating to SectionActions from SCTableViewModelDelegate

Posted by sebaro1989 on 23 February 2016 - 02:06 PM

Hi, i'm currently trying to fix a problem that I have since i upgraded to STV 5, i´m currently modifying a class to fit the deprecated methods SCTableViewModelDelegate and i can't find a SectionAction to fit this method:

 

 

(BOOL)tableViewModel:(SCTableViewModel *)tableViewModel shouldDismissDetailViewForRowAtIndexPath:(NSIndexPath *)indexPath withDetailTableViewModel:(SCTableViewModel *)detailTableViewModel cancelButtonTapped:(BOOL)cancelTapped doneButtonTapped:(BOOL)doneTapped
 

 

I know that i could use: 

 

detailModelShouldDismiss
 

but how could i get the doneButtonTapped at the same time?

 

Thanks in advance,

Regards,

Sebastián


  • Milanon, VewSnignineroqn and Adjuramum like this


#13278 reference SELF

Posted by Tarek on 19 January 2016 - 05:39 AM

Hi ozie,

 

You're not alone! I always thought a good implementation by Apple would've been to have the compiler automatically replace 'self' with a version of weak_self inside blocks, unless specifically marked otherwise by the developer (kind of like how ARC automatically inserts retain/release). In this scenario, if the developer makes a mistake in correctly marking 'self', the code would just crash, instead of just silently leaking memory as is the case now.

 

Having said that, I really don't understand what you're doing with 'strongSelf' in your code. You don't need that at all, just use '[weak_self doThis]'.

 

As for your idea, you could already do that with the existing STV! Let's say your view controller's class is 'RootViewController'. Your code can become:

 

selectionSection.sectionActions.customPresentDetailModel = ^(SCTableViewSection *section, SCTableViewModel *detailModel, NSIndexPath *indexPath) {
    [(RootViewController *)section.ownerTableViewModel.viewController doThis];
    [(RootViewController *)section.ownerTableViewModel.viewController doThat];
});

 

The above is of course perfectly safe and doesn't cause retain loops or memory leaks. Hope this helps.


  • Dave Guerin, ozie and wizgod like this


#13239 We've moved servers!

Posted by Tarek on 12 January 2016 - 04:58 AM

Dear all,

 

During the past few days, we've been having tremendous problems with RackSpace Cloud hosting both in terms of connectivity and guaranteed available resources. Since this wasn't the first time, we've decided to go through with the painful decision of changing providers, and we're very glad we did! We've now moved to DigitalOcean, and as of the time of this writing, I already see much better performance than RackSpace did on very similar configurations.

 

Please accept my apologies on any downtime you may have faced, it was completely out of our hands. The next 24-48hrs are still critical to make sure that everything has been migrated, and please let us know if you face any issues.

 

Best,

Tarek


  • Dave Guerin, ozie and wizgod like this


#13202 Can one tableview with a list open another linked tableview with a list in STV?

Posted by wizgod on 03 January 2016 - 09:25 PM

@Morten: My pleasure!

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


Hahahahahaha!

Wg
  • Dave Guerin, Morten Jacobsen and ozie like this


#12629 Core Data Template - Access details properties

Posted by Tarek on 17 August 2015 - 08:54 AM

Hey guys,

 

You'll be able to provide calculated cell values via two methods:

 

1. Via a new cell action called 'calculatedValue'. This is the quick and easy method if you don't want to use method #2.

 

2. Via your model itself by implementing a getter method. For example, in our CoreDataApp example from above, you would create an NSManagedObject subclass called 'TaskEntity', and then create a new property called 'daysUntilDue' and it's '-(NSInteger)daysUntilDue' getter method. In general, this is a much better design since all your calculations are done in the model itself.

 

Of course we're wide open to any other ideas you guys might have on providing calculated cell values.

 

P.S.: You could already use method #2 with the existing STV, but you'd still have the problem of the calculated cell values not being automatically updated as other cell values change. 


  • yesss, ozie and wizgod like this


#12621 Core Data Template - Access details properties

Posted by Tarek on 14 August 2015 - 02:45 PM

Hi yesss,

 

You're most welcome, it's always my pleasure!

 

The code you just posted uses STV delegates, which have been deprecated since STV 3.0 (hence the compiler errors). We now use the much simpler and more modern STV Actions, which my code above utilizes. 

 

 

Now to your issues: I am sorry I wasn't aware that you were using curly brace binding. I was just going to suggest some additional code updates to accommodate that, but then realized that my code is getting too complicated and is not in harmony with the overall simplicity of STV. If this isn't an urgent project for you, we can roll out a new STV update in about 10 days from now that will make implementing calculated cells a lot more simpler, and will automatically take care of updating these cells when other cells that they depend on change. Please let me know if you can wait that long.

 

Thank you!


  • Dave Guerin, yesss and ozie like this


#12081 Use or Pass PropertyDefinition Actions in/to DataDefinitions When Pushing Vie...

Posted by Tarek on 30 March 2015 - 03:55 PM

Hi Wg,

 

Please note that the main job of data definitions is to generate the UI. when you manually generate UI, the data definitions are not in action anymore (except data definitions of the detail views of the view you manually generated).  When the data definitions are not used, you can define all of their actions directly in the code where you generate the UI, just as you did in your posted code sample. There is no relationship whatsoever between the data definitions and your manually generated UI anymore.

 

Having said that, you don't actually have to have duplicate code. You can simply define an action in a variable, then reuse this variable in multiple places. For instance:

 

// define the block here once
let cellForRowAction : SCCellForRowAtIndexPathAction_Block =
        {
            (itemsSection, indexPath) in
            
            let customCell = SCCustomCell(text: nil, objectBindingsString: nil, nibName: "Objective")
            
            return customCell
        }
        
// then use as many times as you wish
section.sectionActions.cellForRowAtIndexPath = cellForRowAction
        
//etc

  • Dave Guerin, ozie and wizgod like this


#10745 STV 4.0 Preview 2: Visually Customizing UI in Interface Builder

Posted by Tarek on 18 August 2014 - 11:38 AM

Dear all,

 

We're continuing the series of previews of our upcoming STV 4.0 by a video tutorial of how your entire app UI can now be fully visually customized right from Interface Builder. 

 

 

 


  • ozie, netlabs and VewSnignineroqn like this


#10696 willSelect willDeselect issues

Posted by Tarek on 20 June 2014 - 04:15 PM

Ok done. Our latest STV 3.4.1 release adds the new didBecomeFirstResponder and didResignFirstResponder actions. Here are simple examples of how to use them (official documentation will be updated with the STV 4.0 major release)

 

cellActions.didBecomeFirstResponder = ^(SCTableViewCell *cell, NSIndexPath *indexPath)
{
        NSLog(@"Cell at indexPath:%@ has become the first responder.", indexPath);
};
 
cellActions.didResignFirstResponder = ^(SCTableViewCell *cell, NSIndexPath *indexPath)
{
        NSLog(@"Cell at indexPath:%@ has resigned the first responder.", indexPath);
};

 

Hope this helps.


  • Everett, ozie and wizgod like this


#10515 Adding a Tabbed Application to my Existing Project

Posted by Dave Guerin on 31 March 2014 - 01:19 PM

Hi smith01804,

 

The Core Data App example is doing it all with Storyboards, and you are doing it programatically.

 

If you want to do a tab bar app programatically you need something like this in the AppDelegate:

    MyViewController1 *myViewController1 = [[MyViewController1 alloc] initWithStyle:UITableViewStyleGrouped];
    UINavigationController *myNavigationController1 = [[UINavigationController alloc] initWithRootViewController:myViewController1];

    MyViewController2 *myViewController2 = [[MyViewController2 alloc] initWithStyle:UITableViewStyleGrouped];
    UINavigationController *myNavigationController2 = [[UINavigationController alloc] initWithRootViewController:myViewController2];

    UITabBarController *tabBarController = [[UITabBarController alloc] init];
    tabBarController.viewControllers = @[myNavigationController1, myNavigationController2];

    self.window.rootViewController = tabBarController;

There may be typos in there, but hopefully that'll point you in the right direction.

 

If you want to do it via Storyboards then set the Main Interface to your Storyboard. You do that in the General > Deployment Info for the Target.

 

 

Re the "Text View - view" it'll be in your code somewhere :-) Probably in a STV propertyNamesString:


  • Tarek, ozie and wizgod like this