Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Image Support #459

Closed
akhiljayaram opened this issue Aug 25, 2021 · 5 comments
Closed

System Image Support #459

akhiljayaram opened this issue Aug 25, 2021 · 5 comments

Comments

@akhiljayaram
Copy link

Please add support for adding icon with system image.

@futuretap
Copy link
Owner

Interesting idea. What exactly are you looking for? In which element would you like to see system image support?

@akhiljayaram
Copy link
Author

// I just added a hack like this
extension IASKSpecifier
{
var cellSystemImage: UIImage?
{
if let imageName = specifierDict["IASKCellSystemImage"] as? String
{
return UIImage(systemName: imageName)
}
return nil
}
}

// and in cell for indexPath add

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let cell = super.tableView(tableView, cellForRowAt: indexPath)
if let specifier = self.settingsReader?.specifier(for: indexPath)
{
cell.imageView?.image = specifier.cellSystemImage
}
cell.imageView?.tintColor = .label
return cell
}

@pdobrigkeit
Copy link

I would also really like to see this feature. Makes adding premade symbols to the slider for example very easy

@funnel20
Copy link
Contributor

@futuretap I'm a fan of SF Symbols, since the benefits are multiple. It creates a consistent and intuitive UI, without having to add tons of images to an App bundle.

It would be very convenient and highly appreciated when you can add support for SF Symbols (see: systemImageNamed:) to your brilliant project.

@funnel20
Copy link
Contributor

funnel20 commented Feb 16, 2024

@futuretap Thank you for implementing this in version 3.6, highly appreciated to get an even more native look and feel of our app settings bundles.

I have added request #489 to go a step further with SF Symbol Configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants