Difference between revisions of "PSEditingPane"

From iPhone Development Wiki
Jump to: navigation, search
m (Added to Preferences category)
m (Formatting.)
Line 1: Line 1:
 
[[PSEditingPane]] is a subclass of [[UIView]] that provides custom code, instead of via [[PSSpecifier]]s, to manage the user interface.  
 
[[PSEditingPane]] is a subclass of [[UIView]] that provides custom code, instead of via [[PSSpecifier]]s, to manage the user interface.  
  
== Editing pane in Specifier plist ==
+
= Editing pane in Specifier plist =
 +
 
 
You may set the ''pane'' key of a specifier entry, so that when the specifier is tapped, your editing pane will be launched.
 
You may set the ''pane'' key of a specifier entry, so that when the specifier is tapped, your editing pane will be launched.
  
Line 7: Line 8:
  
 
In general, the ''pane'' can be not a subclass of PSEditingPane, but it must be a subclass of [[UIView]] and conforms to the informal protocol:
 
In general, the ''pane'' can be not a subclass of PSEditingPane, but it must be a subclass of [[UIView]] and conforms to the informal protocol:
 +
 
<source lang="objc">
 
<source lang="objc">
 
@protocol PSEditingPane
 
@protocol PSEditingPane
Line 21: Line 23:
 
</source>
 
</source>
  
== Built-in editing panes ==
+
= Built-in editing panes =
 +
 
 
The following panes are built-in in [[Preferences.framework]]:
 
The following panes are built-in in [[Preferences.framework]]:
 +
 
* PSMultiValueEditingPane (Include just a PSSegmentCell, useless by itself.)
 
* PSMultiValueEditingPane (Include just a PSSegmentCell, useless by itself.)
 
* PSTextEditingPane (A pane containing a text field and a keyboard.)
 
* PSTextEditingPane (A pane containing a text field and a keyboard.)
 +
 
and the following in [[Preferences.app]]:
 
and the following in [[Preferences.app]]:
 +
 
* RegulatoryPane (A static image showing the device is FCC approved and in other countries as well.)
 
* RegulatoryPane (A static image showing the device is FCC approved and in other countries as well.)
 
* LegalMessagePane
 
* LegalMessagePane
Line 31: Line 37:
 
* RingtonePane (Note that the ringtone will be played when selected.)
 
* RingtonePane (Note that the ringtone will be played when selected.)
  
== References ==
+
= External links =
{{IPFHeader|Preferences}}
+
 
 +
* Header: http://github.com/kennytm/iphone-private-frameworks/blob/master/Preferences/PSEditingPane.h
  
 +
{{occlass|library=Preferences.framework|navbox=1}}
 
[[Category:Preferences]]
 
[[Category:Preferences]]

Revision as of 19:43, 2 January 2016

PSEditingPane is a subclass of UIView that provides custom code, instead of via PSSpecifiers, to manage the user interface.

Editing pane in Specifier plist

You may set the pane key of a specifier entry, so that when the specifier is tapped, your editing pane will be launched.

An edit pane class is useless unless the detail key is PSDetailController or its subclass is used. The edit pane itself is invoked in -[PSDetailController viewWillBecomeVisible:].

In general, the pane can be not a subclass of PSEditingPane, but it must be a subclass of UIView and conforms to the informal protocol:

@protocol PSEditingPane
+(CGSize)defaultSize;
+(UIColor*)defaultBackgroundColor;
-(void)setDelegate:(id)del;  // del usually is of type PSDetailController*
@property(retain) PSSpecifier* preferenceSpecifier;
@property(retain) id preferenceValue;
-(BOOL)handlesDoneButton;    // return NO if you don't need a custom routine to save changes.
-(BOOL)requiresKeyboard;
@optional
-(void)viewWillRedisplay;
@end

Built-in editing panes

The following panes are built-in in Preferences.framework:

  • PSMultiValueEditingPane (Include just a PSSegmentCell, useless by itself.)
  • PSTextEditingPane (A pane containing a text field and a keyboard.)

and the following in Preferences.app:

  • RegulatoryPane (A static image showing the device is FCC approved and in other countries as well.)
  • LegalMessagePane
  • TimeZonePane (Time zone selector. The returned value doesn't contain just time zone, but also city location.)
  • RingtonePane (Note that the ringtone will be played when selected.)

External links