Jump to content

Fadexz

Senior Member
  • Posts

    2,205
  • Joined

  • Last visited

Posts posted by Fadexz

  1. @Ibrahim 89 Did you check my reply for the missing thing for it to work?

     

    This is what my file looks like.

    (sorry no formatting)

     

    #import <Preferences/PSListController.h>
    #import <Preferences/PSSpecifier.h>
    #import <Preferences/PSControlTableCell.h>


    @interface PSSwitchTableCell : PSControlTableCell
     -(id)initWithStyle:(int)style reuseIdentifier:(id)identifier specifier:(id)specifier;
    @end

    @interface SRSwitchTableCell : PSSwitchTableCell
    @end
     
    @implementation SRSwitchTableCell
     -(id)initWithStyle:(int)style reuseIdentifier:(id)identifier specifier:(id)specifier {
     self = [super initWithStyle:style reuseIdentifier:identifier specifier:specifier];
     if(self) {
      [((UISwitch *)[self control]) setOnTintColor:[UIColor colorWithRed:0.90 green:0.50 blue:0.05 alpha:1.0]];
      [((UISwitch *)[self control]) setThumbTintColor:[UIColor blackColor]];
      [((UISwitch *)[self control]) setTintColor:[UIColor colorWithRed:0.30 green:0.20 blue:0.03 alpha:1.0]];
     }
     return self;
    }
    @end

  2. On 10/30/2019 at 6:05 PM, vanwijkdave said:

    Hey Joka 👋🏻

    I followed the excact steps, but i keep ending up with theos outputtion this error:

    
    installerPrefsRootListController.m:12:32: error: cannot find interface
          declaration for 'PSControlTableCell', superclass of 'PSSwitchTableCell'
    @interface PSSwitchTableCell : PSControlTableCell
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ^
    installerPrefsRootListController.m:26:29: error: no visible @interface for
          'SRSwitchTableCell' declares the selector 'control'
            [((UISwitch *)[self control]) setOnTintColor:[UIColor blackColor...
                           ~~~~ ^~~~~~~
    2 errors generated.

    Do you know what the cause is, do i need to add something to my header file?

    Thanks in advance!

    Check my reply (2 before yours).

×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines