Vous êtes sur la page 1sur 31

Delegate

A delegate object is an object that gets notified when the object to which it is connected reaches certain events or states. That is a delegate (a helper object that takes responsibility for, or aids in, some of the tasks an object is responsible for) to the UIApplication object. It is normally used to perform tasks on application startup and shutdown, handling URL open requests and similar application-wide tasks

AppDelegate
AppDelegate is handling special UIApplication states.This lets you do initialization/cleanup of your app at the right time.So basically the delegate is responsible for monitoring when it is safe to open/close things, terminate the app etc, and it talks to the application, and gives it accurate & critical information, with regards to how & when to do these tasks?. The only way I can imagine it, is a security guard who is called by the staff inside a building, and asked if it is safe to open the security door; he can answer YES or NO. The only way I can imagine it, is a security guard who is called by the staff inside a building, and asked if it is safe to open the security door; he can answer YES or NO. The basic idea of delegation, is that a controller defines a protocol (a set of method definitions) that describe what a delegate object must do in order to be allowed to respond to a

controllers events. The protocol is a contract where the delegator says If you want to be my delegate, then you must implement these methods. What this does is allows the controller to call methods on its delegate with the knowledge that the delegate will respond to the method calls. The delegate can be of any object type, so the controller is not coupled to a particular Object, but it can still be sure that the delegate will respond when it tries to tell it things.

TableView DataSource Methods


Configuring a Table View tableView:cellForRowAtIndexPath: required method numberOfSectionsInTableView: tableView:numberOfRowsInSection: required method sectionIndexTitlesForTableView: tableView:sectionForSectionIndexTitle:atIndex: tableView:titleForHeaderInSection: --tableView:titleForFooterInSection: -numberOfSectionsInTableView: Asks the data source to return the number of sections in the table view. (NSInteger)numberOfSectionsInTableView:(UITableView

*)tableView Parameters

An

object

representing

the

table

view

requesting

this

information. Return Value The number of sections in tableView. The default value is 1. sectionIndexTitlesForTableView: Asks the data source to return the titles for the sections for a table view. (NSArray *)sectionIndexTitlesForTableView:(UITableView

*)tableView Parameters The table-view object requesting this information. Return Value An array of strings that serve as the title of sections in the table view and appear in the index list on the right side of the table you view. The table view must be in the plain style (UITableViewStylePlain). For example, for an alphabetized list, could return an array containing strings A through Z. tableView:canEditRowAtIndexPath: Asks the data source to verify that the given row is editable. (BOOL)tableView:(UITableView*)tableViewcanEditRowAtIndexPat

h:(NSIndexPath*)indexPath Parameters The table-view object requesting this information. indexPath An index path locating a row in tableView. Return Value YES if the row indicated by indexPath is editable; otherwise, NO. tableView:canMoveRowAtIndexPath: Asks the data source whether a given row can be moved to another location in the table view. (BOOL)tableView:(UITableView*)tableViewcanMoveRowAtIndexPa th:(NSIndexPath *)indexPath Parameters The table-view object requesting this information. indexPath An index path locating a row in tableView. Return Value YES if the row can be moved; otherwise NO. Discussion

This method allows the delegate to specify that the reordering control for a the specified row not be shown. By default, the reordering control is shown if the data source implements the tableView:moveRowAtIndexPath:toIndexPath: method. tableView:cellForRowAtIndexPath: Asks the data source for a cell to insert in a particular location of the table view. (required) - (UITableViewCell*)tableView:(UITableView*)tableViewcellForR owAtIndexPath NSIndexPath *)indexPath Parameters A table-view object requesting the cell. indexPath An index path locating a row in tableView. Return Value An object inheriting from UITableViewCell that the table view can use for the specified row. An assertion is raised if you return nil.

tableView:commitEditingStyle:forRowAtIndexPath: Asks the data source to commit the insertion or deletion of a specified row in the receiver. (void)tableView:(UITableView*)tableViewCommitEditingStyle:(UIT

ableViewCellEditingStyle) editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath Parameters The table-view object requesting the insertion or deletion. editingStyle The cell editing style corresponding to a insertion or deletion requested for the row specified by indexPath. Possible editing styles indexPath An index path locating the row in tableView. tableView:moveRowAtIndexPath:toIndexPath: Tells the data source to move a row at a specific location in the table view to another location. -(void)tableView:(UITableView moveRowAtIndexPath:(NSIndexPath toIndexPath:(NSIndexPath *)toIndexPath Parameters The table-view object requesting this action. fromIndexPath An index path locating the row to be moved in tableView. toIndexPath An index path locating the row in tableView that is the *)tableView *)fromIndexPath are UITableViewCellEditingStyleInsert or UITableViewCellEditingStyleDelete.

destination of the move. Discussion The UITableView object sends this message to the data source when the user presses the reorder control in fromRow. tableView:numberOfRowsInSection: Tells the data source to return the number of rows in a given section of a table view. (required) -(NSInteger)tableView:(UITableView numberOfRowsInSection:(NSInteger)section *)tableView

Parameters The table-view object requesting this information. section An index number identifying a section in tableView. Return Value The number of rows in section. --numberOfSectionsInTableView: tableView:sectionForSectionIndexTitle:atIndex: Asks the data source to return the index of the section having the given title and section title index. (NSInteger)tableView:(UITableView *)tableView

sectionForSectionIndexTitle:(NSString atIndex:(NSInteger)index Parameters The table-view object requesting this information. The title as displayed in the section index of tableView.

*)title

An index number identifying a section title in the array returned by sectionIndexTitlesForTableView:. Return Value An index number identifying a section. ableView:titleForFooterInSection: Asks the data source for the title of the footer of the specified section of the table view. (NSString *)tableView:(UITableView *)tableView

titleForFooterInSection:(NSInteger)section Parameters The table-view object asking for the title. section An index number identifying a section of tableView . Return Value A string to use as the title of the section footer. If you return nil , the section will have no

Discussion

The table view uses a fixed font style for section footer titles. If you want a different font style, return a custom view (for example, a UILabel object) in the delegate method tableView:viewForFooterInSection: instead. tableView:titleForHeaderInSection: Asks the data source for the title of the header of the specified section of the table view. -(NSString *)tableView:(UITableView *)tableView

titleForHeaderInSection:(NSInteger)section Parameters The table-view object asking for the title. section An index number identifying a section of tableView . Return Value A string to use as the title of the section header. If you return nil , the section will have no title. ALERT Responding to Actions alertView:clickedButtonAtIndex: Customizing Behavior willPresentAlertView: didPresentAlertView: alertView:willDismissWithButtonIndex: alertView:didDismissWithButtonIndex:

Canceling alertViewCancel: alertShowHelp: Sent to the delegate when the user clicks the alerts help button. The delegate causes help to be displayed for an alert, directly or indirectly. - (BOOL)alertShowHelp:(NSAlert *)alert (void)alertView:(UIAlertView *)alertView

clickedButtonAtIndex:(NSInteger)buttonIndex

Parameters The alert view containing the button. buttonIndex The position of the clicked button. The button indices start at 0. Discussion The receiver is automatically dismissed after this method is invoked. Availability alertView:didDismissWithButtonIndex: Sent to the delegate after an alert view is dismissed from the screen.

-(void)alertView:(UIAlertView didDismissWithButtonIndex:(NSInteger)buttonIndex Parameters The alert view that was dismissed. buttonIndex

*)alertView

The index of the button that was clicked. The button indices start at 0. If this is the cancel button index, the alert view is canceling. If -1, the cancel button index is not set. alertView:willDismissWithButtonIndex: Sent to the delegate before an alert view is dismissed. -(void)alertView:(UIAlertView willDismissWithButtonIndex:(NSInteger)buttonIndex alertViewCancel: Sent to the delegate before an alert view is canceled. - (void)alertViewCancel:(UIAlertView *)alertView Parameters The alert view that will be canceled. didPresentAlertView: Sent to the delegate after an alert view is presented to the user. *)alertView

- (void)didPresentAlertView:(UIAlertView *)alertView Parameters AlertView The alert view that was displayed. willPresentAlertView: Sent to the delegate before a model view is presented to the user. - (void)willPresentAlertView:(UIAlertView *)alertView Parameters alertView The alert view that is about to be displayed. Availability ACTIONSHEET esponding to Actions actionSheet:clickedButtonAtIndex: Customizing Behavior willPresentActionSheet: didPresentActionSheet: actionSheet:willDismissWithButtonIndex: actionSheet:didDismissWithButtonIndex: Canceling actionSheetCancel: Sent to the delegate when the user clicks a

button on an action sheet. -(void)actionSheet:(UIActionSheet*)actionSheet lickedButtonAtIndex:(NSInteger)buttonIndex Parameters actionSheet The action sheet containing the button. buttonIndex The position of the clicked button. The button indices start at 0. actionSheet:didDismissWithButtonIndex: Sent to the delegate after an action sheet is dismissed from the screen. -(void)actionSheet:(UIActionSheet*)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex Parameters actionSheet The action sheet that was dismissed.

actionSheet:willDismissWithButtonIndex: Sent to the delegate before an action sheet is dismissed. -(void)actionSheet:(UIActionSheet*)actionSheet willDismissWithButtonIndex:(NSInteger)buttonIndex Parameters actionSheet The action sheet that is about to be dismissed. buttonIndex

The index of the button that was clicked. If this is the cancel button index, the action sheet is canceling. If -1, the cancel button index is not set.

actionSheetCancel: Sent to the delegate before an action sheet is canceled. - (void)actionSheetCancel:(UIActionSheet *)actionSheet Parameters actionSheet The action sheet that will be canceled.

willPresentActionSheet: Sent to the delegate before an action sheet is presented to the user. - (void)willPresentActionSheet:(UIActionSheet *)actionSheet Parameters actionSheet The action sheet that is about to be displayed.

DATE PICKER datePickerCell:validateProposedDateValue:timeInterval: The delegate receives this message each time the user attempts

to change the receivers value, allowing the delegate the opportunity to override the change. (void)datePickerCell:(NSDatePickerCell *)aDatePickerCell **)proposedDateValue

validateProposedDateValue:(NSDate Parameters aDatePickerCell The cell cell that sent the message.

timeInterval:(NSTimeInterval *)proposedTimeInterval

TEXTFIELD DELEGATE Managing Editing textFieldShouldBeginEditing: textFieldDidBeginEditing: textFieldShouldEndEditing: textFieldDidEndEditing: Editing the Text Fields Text textField:shouldChangeCharactersInRange:replacementString :MP textFieldShouldClear: textFieldShouldReturn:

Creating Buttons + buttonWithType: Configuring Button Title buttonType property titleLabel property reversesTitleShadowWhenHighlighted property setTitle:forState: setTitleColor:forState: setTitleShadowColor:forState: titleColorForState: titleForState: titleShadowColorForState: font property Deprecated in iOS 3.0 lineBreakMode property Deprecated in iOS 3.0 titleShadowOffset property Deprecated in iOS 3.0 Configuring Button Images adjustsImageWhenHighlighted property adjustsImageWhenDisabled property showsTouchWhenHighlighted property backgroundImageForState: imageForState: setBackgroundImage:forState: setImage:forState: Configuring Edge Insets contentEdgeInsets property titleEdgeInsets property imageEdgeInsets property

Getting the Current State currentTitle property currentTitleColor property currentTitleShadowColor property currentImage property currentBackgroundImage property imageView property Getting Dimensions backgroundRectForBounds: contentRectForBounds: titleRectForContentRect: imageRectForContentRect:

SQLLITE STATEMENTS 1.if (sqlite3_open(dbpath, &contactDB) == SQLITE_OK) 2.sqlite3_prepare_v2(contactDB, insert_stmt, -1, &statement, NULL); 3.if (sqlite3_step(statement) == SQLITE_DONE) 4.sqlite3_finalize(statement); 5.sqlite3_close(contactDB);

XML PARSER
Handling XML
parserDidStartDocument: parserDidEndDocument: parser:didStartElement:namespaceURI:qualifiedName :attributes: parser:didEndElement:namespaceURI:qualifiedName: parser:didStartMappingPrefix:toURI: parser:didEndMappingPrefix:

parser:resolveExternalEntityName:systemID: parser:parseErrorOccurred: parser:validationErrorOccurred: parser:foundCharacters: parser:foundIgnorableWhitespace: parser:foundProcessingInstructionWithTarget:data: parser:foundComment: parser:foundCDATA:

Handling the DTD


parser:foundAttributeDeclarationWithName:forEleme nt:type:defaultValue: parser:foundElementDeclarationWithName:model: parser:foundExternalEntityDeclarationWithName:pub licID:systemID: parser:foundInternalEntityDeclarationWithName:val ue: parser:foundUnparsedEntityDeclarationWithName:pub licID:systemID:notationName: parser:foundNotationDeclarationWithName:publicID:s ystemID:

Instance Methods
parser:didEndElement:namespaceURI:qualifiedNa me:
Sent by a parser object to its delegate when it encounters an end tag for a specific element. - (void)parser:(NSXMLParser *)parser DidEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName Parameters

parser A parser object. elementName A string that is the name of an element (in its end tag). namespaceURI If namespace processing is turned on, contains the URI for the current namespace as a string object. qName If namespace processing is turned on, contains the qualified name for the current namespace as a string object. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:didStartElement:namespaceURI:qualifiedName: attributes: setShouldProcessNamespaces: (NSXMLParser) Declared In NSXMLParser.h

parser:didEndMappingPrefix:
Sent by a parser object to its delegate when a given namespace prefix goes out of scope. - (void)parser:(NSXMLParser *)parser didEndMappingPrefix:(NSString *)prefix Parameters parser A parser object. prefix A string that is a namespace prefix. Discussion The parser sends this message only when namespace-prefix reporting is turned on through the setShouldReportNamespacePrefixes: method. Availability Available in Mac OS X v10.3 and later.

Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:didStartMappingPrefix:toURI: Declared In NSXMLParser.h

parser:didStartElement:namespaceURI:qualifiedNa me:attributes:
Sent by a parser object to its delegate when it encounters a start tag for a given element. - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict Parameters parser A parser object. elementName A string that is the name of an element (in its start tag). namespaceURI If namespace processing is turned on, contains the URI for the current namespace as a string object. qualifiedName If namespace processing is turned on, contains the qualified name for the current namespace as a string object.. attributeDict A dictionary that contains any attributes associated with the element. Keys are the names of attributes, and values are attribute values. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:didEndElement:namespaceURI:qualifiedName: setShouldProcessNamespaces: (NSXMLParser) Declared In

NSXMLParser.h

parser:didStartMappingPrefix:toURI:
Sent by a parser object to its delegate the first time it encounters a given namespace prefix, which is mapped to a URI. - (void)parser:(NSXMLParser *)parser didStartMappingPrefix:(NSString *)prefix toURI:(NSString *)namespaceURI Parameters parser A parser object. prefix A string that is a namespace prefix. namespaceURI A string that specifies a namespace URI. Discussion The parser object sends this message only when namespace-prefix reporting is turned on through the setShouldReportNamespacePrefixes: method. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:didEndMappingPrefix: Declared In NSXMLParser.h

parser:foundAttributeDeclarationWithName:forEle ment:type:defaultValue:
Sent by a parser object to its delegate when it encounters a declaration of an attribute that is associated with a specific element. - (void)parser:(NSXMLParser *)parser foundAttributeDeclarationWithName:(NSString *)attributeName forElement:(NSString *)elementName type:(NSString *)type defaultValue:(NSString *)defaultValue Parameters

parser An NSXMLParser object parsing XML. attributeName A string that is the name of an attribute. elementName A string that is the name of an element that has the attribute attributeName. type A string, such as "ENTITY", "NOTATION", or "ID", that indicates the type of the attribute. defaultValue A string that specifies the default value of the attribute. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:didStartElement:namespaceURI:qualifiedName :attributes: Declared In NSXMLParser.h

parser:foundCDATA:
Sent by a parser object to its delegate when it encounters a CDATA block. - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock Parameters parser An NSXMLParser object parsing XML. CDATABlock A data object containing a block of CDATA. Discussion Through this method the parser object passes the contents of the block to its delegate in an NSData object. The CDATA block is character data that is ignored by the parser. The encoding of the character data is UTF-8. To convert the data object to a string object, use the NSString method initWithData:encoding:.

Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. Declared In NSXMLParser.h

parser:foundCharacters:
Sent by a parser object to provide its delegate with a string representing all or part of the characters of the current element. - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string Parameters parser A parser object. string A string representing the complete or partial textual content of the current element. Discussion The parser object may send the delegate several parser:foundCharacters: messages to report the characters of an element. Because string may be only part of the total character content for the current element, you should append it to the current accumulation of characters until the element changes. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. Declared In NSXMLParser.h

parser:foundComment:
Sent by a parser object to its delegate when it encounters a comment in the XML. - (void)parser:(NSXMLParser *)parser foundComment:(NSString *)comment Parameters parser An NSXMLParser object parsing XML.

comment A string that is a the content of a comment in the XML. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. Declared In NSXMLParser.h

parser:foundElementDeclarationWithName:model:
Sent by a parser object to its delegate when it encounters a declaration of an element with a given model. - (void)parser:(NSXMLParser *)parser foundElementDeclarationWithName:(NSString *)elementName model:(NSString *)model Parameters parser An NSXMLParser object parsing XML. elementName A string that is the name of an element. model A string that specifies a model for elementName. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:didStartElement:namespaceURI:qualifiedName :attributes: Declared In NSXMLParser.h

parser:foundExternalEntityDeclarationWithName:p ublicID:systemID:
Sent by a parser object to its delegate when it encounters an external entity declaration. - (void)parser:(NSXMLParser *)parser foundExternalEntityDeclarationWithName:(NSString

*)entityName publicID:(NSString *)publicID systemID:(NSString *)systemID Parameters parser An NSXMLParser object parsing XML. entityName A string that is the name of an entity. publicID A string that specifies the public ID associated with entityName. systemID A string that specifies the system ID associated with entityName. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:foundInternalEntityDeclarationWithName:val ue: parser:foundUnparsedEntityDeclarationWithName:pub licID:systemID:notationName: parser:resolveExternalEntityName:systemID: Declared In NSXMLParser.h

parser:foundIgnorableWhitespace:
Reported by a parser object to provide its delegate with a string representing all or part of the ignorable whitespace characters of the current element. - (void)parser:(NSXMLParser *)parser foundIgnorableWhitespace:(NSString *)whitespaceString Parameters parser A parser object. whitespaceString A string representing all or part of the ignorable whitespace characters of the current element. Discussion

All the whitespace characters of the element (including carriage returns, tabs, and new-line characters) may not be provided through an individual invocation of this method. The parser may send the delegate several parser:foundIgnorableWhitespace: messages to report the whitespace characters of an element. You should append the characters in each invocation to the current accumulation of characters. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:foundCharacters: Declared In NSXMLParser.h

parser:foundInternalEntityDeclarationWithName:val ue:
Sent by a parser object to the delegate when it encounters an internal entity declaration. - (void)parser:(NSXMLParser *)parser foundInternalEntityDeclarationWithName:(NSString *)name value:(NSString *)value Parameters parser An NSXMLParser object parsing XML. name A string that is the declared name of an internal entity. value A string that is the value of entity name. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:foundExternalEntityDeclarationWithName:pub licID:systemID: parser:foundUnparsedEntityDeclarationWithName:pub

licID:systemID:notationName: Declared In NSXMLParser.h

parser:foundNotationDeclarationWithName:publicI D:systemID:
Sent by a parser object to its delegate when it encounters a notation declaration. - (void)parser:(NSXMLParser *)parser foundNotationDeclarationWithName:(NSString *)name publicID:(NSString *)publicID systemID:(NSString *)systemID Parameters parser An NSXMLParser object parsing XML. name A string that is the name of the notation. publicID A string specifying the public ID associated with the notation name. systemID A string specifying the system ID associated with the notation name. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. Declared In NSXMLParser.h

parser:foundProcessingInstructionWithTarget:data:
Sent by a parser object to its delegate when it encounters a processing instruction. - (void)parser:(NSXMLParser *)parser foundProcessingInstructionWithTarget:(NSString *)target data:(NSString *)data Parameters parser A parser object. target

A string representing the target of a processing instruction. data A string representing the data for a processing instruction. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. Declared In NSXMLParser.h

parser:foundUnparsedEntityDeclarationWithName: publicID:systemID:notationName:
Sent by a parser object to its delegate when it encounters an unparsed entity declaration. - (void)parser:(NSXMLParser *)parser foundUnparsedEntityDeclarationWithName:(NSString *)name publicID:(NSString *)publicID systemID:(NSString *)systemID notationName:(NSString *)notationName Parameters An NSXMLParser object parsing XML. name A string that is the name of the unparsed entity in the declaration. publicID A string specifying the public ID associated with the entity name. systemID A string specifying the system ID associated with the entity name. notationName A string specifying a notation of the declaration of entity name. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:foundExternalEntityDeclarationWithName:pub licID:systemID: parser:foundInternalEntityDeclarationWithName:val

ue: parser:resolveExternalEntityName:systemID: Declared In NSXMLParser.h

parser:parseErrorOccurred:
Sent by a parser object to its delegate when it encounters a fatal error. - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError Parameters parseError An NSError object describing the parsing error that occurred. Discussion When this method is invoked, parsing is stopped. For further information about the error, you can query parseError or you can send the parser a parserError message. You can also send the parser lineNumber and columnNumber messages to further isolate where the error occurred. Typically you implement this method to display information about the error to the user. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X See Also parser:validationErrorOccurred: Declared In NSXMLParser.h

parser:resolveExternalEntityName:systemID:
Sent by a parser object to its delegate when it encounters a given external entity with a specific system ID. - (NSData *)parser:(NSXMLParser *)parser resolveExternalEntityName:(NSString *)entityName systemID:(NSString *)systemID Parameters A parser object. entityName A string that specifies the external name of an entity. systemID A string that specifies the system ID for the external entity.

Return Value An NSData object that contains the resolution of the given external entity. Discussion The delegate can resolve the external entity (for example, locating and reading an externally declared DTD) and provide the result to the parser object as an NSData object. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parser:foundExternalEntityDeclarationWithName:pub licID:systemID: parser:foundUnparsedEntityDeclarationWithName:pub licID:systemID:notationName: Declared In NSXMLParser.h

parser:validationErrorOccurred:
Sent by a parser object to its delegate when it encounters a fatal validation error. NSXMLParser currently does not invoke this method and does not perform validation. - (void)parser:(NSXMLParser *)parser validationErrorOccurred:(NSError *)validError Parameters A parser object. validError An NSError object describing the validation error that occurred. Discussion If you want to validate an XML document, use the validation features of the NSXMLDocument class. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also

parser:parseErrorOccurred: Declared In NSXMLParser.h

parserDidEndDocument:
Sent by the parser object to the delegate when it has successfully completed parsing. - (void)parserDidEndDocument:(NSXMLParser *)parser Parameters A parser object. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parserDidStartDocument: Declared In NSXMLParser.h

parserDidStartDocument:
Sent by the parser object to the delegate when it begins parsing a document. - (void)parserDidStartDocument:(NSXMLParser *)parser Parameters A parser object. Availability Available in Mac OS X v10.3 and later. Available as part of an informal protocol prior to Mac OS X v10.6. See Also parserDidEndDocument: Declared In NSXMLParser.h Next

Vous aimerez peut-être aussi