UA-17470720-3

Jump to content


Photo
- - - - -

STV Swift Package


  • Please log in to reply
1 reply to this topic

#1 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 541 posts
  • LocationIreland
Reputation: 134
Popular

Posted 26 October 2019 - 02:46 AM

Hi all,
 
Long time no see!! I hope everyone is happy, in good health, and keeping busy.
 
I'm not sure about everyone else, but I still use STV in my apps. There were quite a few issues with iOS 13, STV was "attempting to access the table view's visibleCells while they were in the process of being updated, which is not allowed" which was causing an assert in the first few betas. Release versions of iSO 13 no longer assert, just loads of warnings in the console.
 
I've updated the STV code to no longer cause these assets/warnings, and fixed quite a few other warnings as well, and eventually got STV to work as a Swift Package. Hurrah! STV might be slightly less efficient  as a result of some of my changes, but it works for me!
 
If anyone else is interested I can make my currently private STV GitHub repository public for everyone to use. It's not a fork of Wizgods repository, more a total rebuild from scratch. Here's my full CHANGELOG:
 
 
* No longer a framework, now a Swift Package.
* Added Ozies fix for disappearing cells in iOS 11. Thanks Ozie!
* Added lots of self-> to avoid an Xcode warning: "Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behaviour".
* Remarked out the -splitViewController:shouldHideViewController:inOrientation: method as it's now deprecated.
* The -live method of SCTableViewModel was causing an assert in iOS 13: "Attempted to access the table view's visibleCells while they were in the process of being updated, which is not allowed". So STV is no longer trying to count the visibleCells there, which might make it slightly less efficient, but there's no assert!
* The -cellAtIndexPath: method of SCTableViewModel was also causing an assert in iOS 13: "Attempted to call -cellForRowAtIndexPath: on the table view while it was in the process of updating its visible cells, which is not allowed". This was introduced by the change in -live. So STV is no longer calling -cellForRowAtIndexPath here, which again is going to make it less efficient, but now there's no assert.
* The -tableView:shouldIndentWhileEditingRowAtIndexPath: method of  SCTableViewModel was also causing an assert in iOS 13: "Attempted to call -cellForRowAtIndexPath: on the table view while it was in the process of updating its visible cells, which is not allowed." A bit of a kludge, but the method now just returns the default value, YES, here.
* Remarked out a deprecated method -splitViewController:shouldHideViewController:inOrientation: in both SCViewController and SCTableViewController.
* Fixed lots of "This block declaration is not a prototype" warnings from Xcode 11 with the suggested fix of adding void.
* Removed all the Interface Builder/Storyboard stuff, sorry Tarek.
* Removed the examples.
* Removed the framework build scripts as they are no longer required.
* Removed the install and uninstall scripts as they are no longer required.
* Removed the Xcode templates.
* Edited the inline documentation to fix all Xcode warnings.
* Added STVCoreData classes to the main package. STViCloud, STVParse, and STVWebServices are not part of this package.
* Added license files in TXT and PLIST format. The PLIST can be used in a Settings bundle.
 
 
The license is as follows:
 
Sensible TableView
Copyright © 2018 SensibleCocoa
Copyright © 2018 Wizgod
Copyright © 2019 dgApps
 
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
 
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
Open sourced with the permission of Sensible Cocoa/Tarek Sakr on 12 April 2018.
 
 
I also changed the copyright in each file to just "Copyright 2011-2015 Sensible Cocoa. All rights reserved."
 
And added my own copyright to just the files I'd made changes in.
 
 
I'm working on getting the documentation to up to date, and want to change all the UIColor to iOS 13 system colours so that Dark Mode is supported, and change all UIFont to UIFontTextStyles so that Dynamic Type is supported.
 
 
 
 
 
 
All comments welcome!
 
Cheers, 
 
Dave 
 
 

Cheers,

Dave

www.dgapps.ie

#2 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 541 posts
  • LocationIreland
Reputation: 134
Popular

Posted 12 November 2019 - 07:53 AM

Hello again everyone,

 

I made my STV Swift Package public if any one is interested:

 

https://github.com/daveguerin/STV

 

 

As well as the changes I listed above, the following has also changed:

 

 

Now using iOS 13 labelColor with a fallback for earlier iOS.

Now using UIFontTextStyleBody as the main font.
Added two new cellActions: leadingSwipeActions and trailingSwipeActions. iOS 11 and up only.
All UIPopoverController are now clang diagnostic ignored "-Wdeprecated-declarations"

 

 

The documentation has also been update slightly:

 

https://daveguerin.github.io/STV/

 

and there's a new Docset Feed:

 

https://daveguerin.g...docsets/STV.xml

 

 

All comments welcome!

 

 


Cheers,

Dave

www.dgapps.ie




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users