UA-17470720-3

Jump to content


Photo
- - - - -

STV Development status

general feature-request

  • Please log in to reply
6 replies to this topic

#1 sserye

sserye

    Jr. Member

  • STV 5.0 Pro
  • PipPip
  • 17 posts
Reputation: 5
Good

Posted 11 June 2017 - 07:06 PM

Hi,

 

I would like to know what is the status of the STV Development so far. I am getting a lot of deprecated API warnings trying to update my app to iOS 10. Most of them regarding the use of UIAlertView.

I noticed also, there are not new release since last year.

 

Could you please give us feedback about the STV?

 

Thanks in advance.

Sergio.


  • halldorg likes this

#2 sserye

sserye

    Jr. Member

  • STV 5.0 Pro
  • PipPip
  • 17 posts
Reputation: 5
Good

Posted 12 June 2017 - 12:04 PM

No feedback about it?

 

It seems I should consider removing STV support on my Apps  :(


  • halldorg likes this

#3 halldorg

halldorg

    Jr. Member

  • STV 5.0 Std
  • PipPip
  • 26 posts
Reputation: 5
Good

Posted 20 June 2017 - 03:07 PM

No feedback about it?

 

It seems I should consider removing STV support on my Apps  :(

 

Sadly, that seems to be the only viable option.



#4 Steve McKenna

Steve McKenna

    Sr. Member

  • STV 4.0 Pro
  • PipPipPip
  • 32 posts
Reputation: 4
Good

Posted 06 July 2017 - 04:04 AM

Even if the visual functionality is no longer available, I would encourage Sensible Cocoa to continue development. I considered STV very worthwhile longer before the visual functionality was available!



#5 sserye

sserye

    Jr. Member

  • STV 5.0 Pro
  • PipPip
  • 17 posts
Reputation: 5
Good

Posted 06 July 2017 - 06:24 AM

Even if the visual functionality is no longer available, I would encourage Sensible Cocoa to continue development. I considered STV very worthwhile longer before the visual functionality was available!

 

Hi, you are right. I don't use the visual functionality at all, I use STV only by code, but I think, as a PRO customer, I have the right to know about the future of STV. If you read all the replies of this post, nobody representing STV have answered my question yet.



#6 wizgod

wizgod

    I'm what you guys call a User

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 575 posts
  • LocationThe Grid
Reputation: 149
Popular

Posted 12 July 2017 - 08:19 AM

Greetings Programs!

 

What type of errors are you getting? I'm using XCode Version 8.3.3 (8E3004b) with a build target of 10.3 in my app and STV code only and no issues.

 

You probably have already found this out since your original post but the UIAlertView was deprecated in iOS 9. You need to replace it with the UIAlertController and UIAlertAction.

 

I created an extension for UINavigationController (and supporting extensions) that makes things easier for me to display an alert:

 

import Foundation

extension UINavigationController
{
    func alert(title: String, message: String) {
        self.alert(title:title, message:message, handler:nil)
    }
    
    func alert(title: String, message: String, handler: ((UIAlertAction) -> Swift.Void)? = nil) {
        self.alert(title: title, message: message, buttonTitle: "OK", handler: handler)
    }
    
    func alert(title: String, message: String, buttonTitle: String, handler: ((UIAlertAction) -> Swift.Void)? = nil) {
        self.alert(title: title, message: message, okButtonTitle: buttonTitle, cancelButtonTitle: nil, okHandler: handler, cancelButtonHandler: nil)
    }
    
    func alert(title: String, message: String, okButtonTitle: String, cancelButtonTitle: String?, okHandler: ((UIAlertAction) -> Swift.Void)? = nil, cancelButtonHandler: ((UIAlertAction) -> Swift.Void)? = nil) {
        let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
        
        alert.addAction(UIAlertAction(title: okButtonTitle, style: UIAlertActionStyle.default, handler: okHandler))

        if (cancelButtonTitle != nil) {
            alert.addAction(UIAlertAction(title: cancelButtonTitle, style: UIAlertActionStyle.default, handler: cancelButtonHandler))
        }
        
        present(alert, animated: true, completion: nil)
    }
}

 

import Foundation

extension UIApplication {

    class func topViewController(_ viewController: UIViewController? = UIApplication.shared.keyWindow?.rootViewController) -> UIViewController? {
        if let nav = viewController as? UINavigationController {
            return topViewController(nav.visibleViewController)
        }
		
        if let tab = viewController as? UITabBarController {
            if let selected = tab.selectedViewController {
                return topViewController(selected)
            }
        }

        if let presented = viewController?.presentedViewController {
            return topViewController(presented)
        }

        return viewController
    }
}

 

import UIKit

extension UIViewController {
    var topNavigationController: UINavigationController? {
        get {
            return UIApplication.topViewController()?.navigationController
        }
    }
}

 

and some examples of it's usage:

 

topNavigationController!.alert(title: "Error", message: "All fields are required.")

topNavigationController!.alert(title: "Password Change Required", message: "You are required to create your own password on initial login.", handler: { [weak self]
    action in

    self?.performSegue(withIdentifier: "ChangePassword", sender: nil)
 })

 tableViewModel.sectionActions.willDeleteItem = { [weak self]
    (itemsSection, item, indexPath) -> Bool in
			
    guard let boundObject = item as? NSDictionary else {
        return false
    }
			
    let title = "Delete Entry"
    let message = "Do you wish to delete this timesheet entry?"
    let confirmAction = "DELETE"
			
    itemsSection?.ownerTableViewModel.viewController.navigationController?.alert(title: title, message: message, okButtonTitle: confirmAction, cancelButtonTitle: "Cancel", okHandler: { [weak self]
        action in

        self?.deleteTimesheetEntry(boundObject)
        }, cancelButtonHandler: nil)
    
    return false
}

 

Wg


Edited by wizgod, 12 July 2017 - 08:25 AM.

  • Dave Guerin likes this

P.S. I love Swift... talk Swift.. Never too old school to learn yet another programming language. LOL! ;-)


#7 designwerks

designwerks

    Advanced Member

  • STV 5.0 Std
  • PipPipPipPipPip
  • 139 posts
  • LocationKingsville, Ontario, Canada
Reputation: 23
Excellent

Posted 19 March 2018 - 10:23 AM

+1 on hoping the development continues!


  • Dave Guerin likes this





Also tagged with one or more of these keywords: general, feature-request

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users