iphone Programming Glossary: attributes
How can I get a writable path on the iPhone? http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone NO NSFileManager defaultManager createDirectoryAtPath cachePath withIntermediateDirectories NO attributes nil error error Note that you have to actually create the Caches directory there so when writing you..
underline text in UIlabel http://stackoverflow.com/questions/2711297/underline-text-in-uilabel myLabel.attributedText NSAttributedString alloc initWithString @ Test string attributes underlineAttribute If you still wish to support iOS 4 and iOS 5 I'd recommend to use TTTAttributedLabel..
How do you use NSAttributedString? http://stackoverflow.com/questions/3482346/how-do-you-use-nsattributedstring word in wordToColorMapping UIColor color wordToColorMapping objectForKey word NSDictionary attributes NSDictionary dictionaryWithObject color forKey NSForegroundColorAttributeName NSAttributedString subString.. NSAttributedString subString NSAttributedString alloc initWithString word attributes attributes string appendAttributedString subString subString release display string share improve.. NSAttributedString subString NSAttributedString alloc initWithString word attributes attributes string appendAttributedString subString subString release display string share improve this answer..
Bold & Non-Bold Text In A Single UILabel? http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel regularFont UIFont systemFontOfSize fontSize UIColor foregroundColor UIColor whiteColor Create the attributes NSDictionary attrs NSDictionary dictionaryWithObjectsAndKeys boldFont NSFontAttributeName foregroundColor.. 8 12 range of 2012 10 14 . Ideally this should not be hardcoded Create the attributed string text attributes NSMutableAttributedString attributedText NSMutableAttributedString alloc initWithString text attributes.. NSMutableAttributedString attributedText NSMutableAttributedString alloc initWithString text attributes attrs attributedText setAttributes subAttrs range range Set it in our UILabel and we are done _label..
iphone/ipad: How exactly use NSAttributedString? http://stackoverflow.com/questions/3786528/iphone-ipad-how-exactly-use-nsattributedstring of UILabel that draws an NSAttributedString and also provides convenience methods for setting the attributes of an NSAttributedString from UIKit classes. From the sample provided in the repo #import NSAttributedString..
NSXMLParser example http://stackoverflow.com/questions/4705588/nsxmlparser-example NSString elementName namespaceURI NSString namespaceURI qualifiedName NSString qName attributes NSDictionary attributeDict currentKey nil currentStringValue release currentStringValue nil if elementName..
Faster alternative to glReadPixels in iPhone OpenGL ES 2.0 http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0 kCFAllocatorDefault coreVideoTextureCache renderTarget NULL texture attributes GL_TEXTURE_2D GL_RGBA opengl format int videoSize.width int videoSize.height GL_BGRA..
Consume WCF Web Service using Objective-C on iPhone http://stackoverflow.com/questions/982622/consume-wcf-web-service-using-objective-c-on-iphone NSString elementName namespaceURI NSString namespaceURI qualifiedName NSString qName attributes NSDictionary attributeDict void parser NSXMLParser parser foundCharacters NSString string void parser..
How can I get a writable path on the iPhone? http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone fileExistsAtPath cachePath isDirectory isDir isDir NO NSFileManager defaultManager createDirectoryAtPath cachePath withIntermediateDirectories NO attributes nil error error Note that you have to actually create the Caches directory there so when writing you have to check and create every time Kind of a pain but that's..
underline text in UIlabel http://stackoverflow.com/questions/2711297/underline-text-in-uilabel underlineAttribute @ NSUnderlineStyleAttributeName @ NSUnderlineStyleSingle myLabel.attributedText NSAttributedString alloc initWithString @ Test string attributes underlineAttribute If you still wish to support iOS 4 and iOS 5 I'd recommend to use TTTAttributedLabel rather than underline label manually. However if you need..
How do you use NSAttributedString? http://stackoverflow.com/questions/3482346/how-do-you-use-nsattributedstring NSMutableAttributedString alloc initWithString @ for NSString word in wordToColorMapping UIColor color wordToColorMapping objectForKey word NSDictionary attributes NSDictionary dictionaryWithObject color forKey NSForegroundColorAttributeName NSAttributedString subString NSAttributedString alloc initWithString word attributes..
Bold & Non-Bold Text In A Single UILabel? http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel UIFont boldFont UIFont boldSystemFontOfSize fontSize UIFont regularFont UIFont systemFontOfSize fontSize UIColor foregroundColor UIColor whiteColor Create the attributes NSDictionary attrs NSDictionary dictionaryWithObjectsAndKeys boldFont NSFontAttributeName foregroundColor NSForegroundColorAttributeName nil NSDictionary subAttrs.. NSFontAttributeName nil const NSRange range NSMakeRange 8 12 range of 2012 10 14 . Ideally this should not be hardcoded Create the attributed string text attributes NSMutableAttributedString attributedText NSMutableAttributedString alloc initWithString text attributes attrs attributedText setAttributes subAttrs range range.. not be hardcoded Create the attributed string text attributes NSMutableAttributedString attributedText NSMutableAttributedString alloc initWithString text attributes attrs attributedText setAttributes subAttrs range range Set it in our UILabel and we are done _label setAttributedText attributedText else iOS5 and below Here we..
iphone/ipad: How exactly use NSAttributedString? http://stackoverflow.com/questions/3786528/iphone-ipad-how-exactly-use-nsattributedstring a look at AliSoftware's OHAttributedLabel . It is a subclass of UILabel that draws an NSAttributedString and also provides convenience methods for setting the attributes of an NSAttributedString from UIKit classes. From the sample provided in the repo #import NSAttributedString Attributes.h #import OHAttributedLabel.h 1 Build the..
NSXMLParser example http://stackoverflow.com/questions/4705588/nsxmlparser-example improve this question void parser NSXMLParser parser didStartElement NSString elementName namespaceURI NSString namespaceURI qualifiedName NSString qName attributes NSDictionary attributeDict currentKey nil currentStringValue release currentStringValue nil if elementName isEqualToString @ Value alloc some object to parse value..
Faster alternative to glReadPixels in iPhone OpenGL ES 2.0 http://stackoverflow.com/questions/9550297/faster-alternative-to-glreadpixels-in-iphone-opengl-es-2-0 CVOpenGLESTextureRef renderTexture CVOpenGLESTextureCacheCreateTextureFromImage kCFAllocatorDefault coreVideoTextureCache renderTarget NULL texture attributes GL_TEXTURE_2D GL_RGBA opengl format int videoSize.width int videoSize.height GL_BGRA native iOS format GL_UNSIGNED_BYTE 0 renderTexture..
Consume WCF Web Service using Objective-C on iPhone http://stackoverflow.com/questions/982622/consume-wcf-web-service-using-objective-c-on-iphone mark XMLParser methods void parser NSXMLParser parser didStartElement NSString elementName namespaceURI NSString namespaceURI qualifiedName NSString qName attributes NSDictionary attributeDict void parser NSXMLParser parser foundCharacters NSString string void parser NSXMLParser parser didEndElement NSString elementName namespaceURI..
How can I get a writable path on the iPhone? http://stackoverflow.com/questions/1567134/how-can-i-get-a-writable-path-on-the-iphone isDirectory isDir isDir NO NSFileManager defaultManager createDirectoryAtPath cachePath withIntermediateDirectories NO attributes nil error error Note that you have to actually create the Caches directory there so when writing you have to check and create..
underline text in UIlabel http://stackoverflow.com/questions/2711297/underline-text-in-uilabel @ NSUnderlineStyleSingle myLabel.attributedText NSAttributedString alloc initWithString @ Test string attributes underlineAttribute If you still wish to support iOS 4 and iOS 5 I'd recommend to use TTTAttributedLabel rather than underline..
How do you use NSAttributedString? http://stackoverflow.com/questions/3482346/how-do-you-use-nsattributedstring @ for NSString word in wordToColorMapping UIColor color wordToColorMapping objectForKey word NSDictionary attributes NSDictionary dictionaryWithObject color forKey NSForegroundColorAttributeName NSAttributedString subString NSAttributedString..
Bold & Non-Bold Text In A Single UILabel? http://stackoverflow.com/questions/3586871/bold-non-bold-text-in-a-single-uilabel fontSize UIFont regularFont UIFont systemFontOfSize fontSize UIColor foregroundColor UIColor whiteColor Create the attributes NSDictionary attrs NSDictionary dictionaryWithObjectsAndKeys boldFont NSFontAttributeName foregroundColor NSForegroundColorAttributeName.. range NSMakeRange 8 12 range of 2012 10 14 . Ideally this should not be hardcoded Create the attributed string text attributes NSMutableAttributedString attributedText NSMutableAttributedString alloc initWithString text attributes attrs attributedText.. string text attributes NSMutableAttributedString attributedText NSMutableAttributedString alloc initWithString text attributes attrs attributedText setAttributes subAttrs range range Set it in our UILabel and we are done _label setAttributedText attributedText..
iphone/ipad: How exactly use NSAttributedString? http://stackoverflow.com/questions/3786528/iphone-ipad-how-exactly-use-nsattributedstring . It is a subclass of UILabel that draws an NSAttributedString and also provides convenience methods for setting the attributes of an NSAttributedString from UIKit classes. From the sample provided in the repo #import NSAttributedString Attributes.h..
NSXMLParser example http://stackoverflow.com/questions/4705588/nsxmlparser-example parser didStartElement NSString elementName namespaceURI NSString namespaceURI qualifiedName NSString qName attributes NSDictionary attributeDict currentKey nil currentStringValue release currentStringValue nil if elementName isEqualToString..
Consume WCF Web Service using Objective-C on iPhone http://stackoverflow.com/questions/982622/consume-wcf-web-service-using-objective-c-on-iphone parser didStartElement NSString elementName namespaceURI NSString namespaceURI qualifiedName NSString qName attributes NSDictionary attributeDict void parser NSXMLParser parser foundCharacters NSString string void parser NSXMLParser parser..
Placeholder in UITextView http://stackoverflow.com/questions/1328638/placeholder-in-uitextview _placeholder nil super dealloc #endif void awakeFromNib super awakeFromNib Use Interface Builder User Defined Runtime Attributes to set placeholder and placeholderColor in Interface Builder. if self.placeholder self setPlaceholder @ if self.placeholderColor..
Core Data Relationships: How to insert a new object into an entity and create a relationship to an existing object in another entity http://stackoverflow.com/questions/19303062/core-data-relationships-how-to-insert-a-new-object-into-an-entity-and-create-a but have run out of luck. Any help would be very much appreciated. I have 3 entities Scores Games and Players . Scores Attributes date player1Score player2Score and status. Games Attributes title. Players Attributes name. I have many to many relationships.. I have 3 entities Scores Games and Players . Scores Attributes date player1Score player2Score and status. Games Attributes title. Players Attributes name. I have many to many relationships between Scores Games and Scores Players I already have.. Games and Players . Scores Attributes date player1Score player2Score and status. Games Attributes title. Players Attributes name. I have many to many relationships between Scores Games and Scores Players I already have a list of both games and..
iPhone + UITableView + place an image for separator http://stackoverflow.com/questions/2227420/iphone-uitableview-place-an-image-for-separator UITableView place an image for separator I have UITableView in my application. Attributes TableStyle Plain SeperatorStyle single and SeperatorColor black What I want to do is that I want to put a image which a..
Core Data data model: attribute type for UIColor http://stackoverflow.com/questions/2304882/core-data-data-model-attribute-type-for-uicolor this question What you probably want is a transformable attribute. Give the section on Non standard Persistent Attributes in the Core Data Programming Guide an other read. A transformable attribute is underneath the covers a binary data attribute..
How to set text in a UITextView as a link to a URL http://stackoverflow.com/questions/2489950/how-to-set-text-in-a-uitextview-as-a-link-to-a-url share improve this question In Interface Builder select the UITextView open the inspector go to the Text View Attributes tab then make share Detect Links is checked. This only works for items that look like links http stackoverflow.com For making..
Customize UIBarbuttonitem with Background Images http://stackoverflow.com/questions/3093468/customize-uibarbuttonitem-with-background-images and they look exactly as they are. Its a pretty simple task while using UIButton. I just used Image option in the Attributes inspector for UIButton and select the image i want. But here while using UIBarButtonitem it doesnt work at all. This is..
Arbitrary Attributes in Core Data http://stackoverflow.com/questions/3561936/arbitrary-attributes-in-core-data Attributes in Core Data In short I want to associate arbitrary key value pairs with the objects of a Core Data entity on an iPad app... Entry ... Unified builtin property and extraAttribute accessor expects human readable name since that's all ExtraAttributes have . id valueForPropertyName NSString name if Entry humanReadablePropertyNames containsObject name return self valueForKey.. propertyKeyForHumanReadableName name else NSPredicate p NSPredicate predicateWithFormat @ key @ name return self.extraAttributes filteredSetUsingPredicate p anyObject value void sortByPropertyName NSString name inManagedObjectContext NSManagedObjectContext..
User Defined Runtime Attributes in IB for iPhone not working http://stackoverflow.com/questions/3980251/user-defined-runtime-attributes-in-ib-for-iphone-not-working Defined Runtime Attributes in IB for iPhone not working I have a weird problem. I am trying to setup User Defined Runtime Attribute in the IB. As.. I know I can set up user defined attributes in iOS from the iOS docs found here go down to section Configuring Runtime Attributes for Custom Objects Any idea why it is giving me the error iphone interface builder share improve this question User..
Parser XML with NSXMLParser http://stackoverflow.com/questions/4209860/parser-xml-with-nsxmlparser
What is objc_setAssociatedObject() and in what cases should it be used? http://stackoverflow.com/questions/5909412/what-is-objc-setassociatedobject-and-in-what-cases-should-it-be-used or non atomically. This pattern is similar to that of the attributes of a declared property see œProperty Declaration Attributes . You specify the policy for the relationship using a constant see objc_AssociationPolicy and Associative Object Behaviors..
How to use a common target object to handle actions/outlets of multiple views? http://stackoverflow.com/questions/6950674/how-to-use-a-common-target-object-to-handle-actions-outlets-of-multiple-views with File's Owner in Xcode 4.x. Select it and in the Identity Inspector set it's class to the appropriate type. In the Attributes Inspector set the Identifier string to TargetObject or whatever string you want to use in the code below . Profit The Code..
Why doesn't @contenteditable work on the iPhone? http://stackoverflow.com/questions/723592/why-doesnt-contenteditable-work-on-the-iphone doesn't @contenteditable work on the iPhone Safari HTML Reference Supported Attributes says contenteditable If true the element can be edited on the fly if false it cannot. Availability Available in Safari 1.2..
Xcode 4.2 Warnings when dropping Nav Controller on Tab Bar in IB http://stackoverflow.com/questions/7625731/xcode-4-2-warnings-when-dropping-nav-controller-on-tab-bar-in-ib
Storyboard - refer to ViewController in AppDelegate http://stackoverflow.com/questions/8186375/storyboard-refer-to-viewcontroller-in-appdelegate . This allows you to instantiate a view controller from your storyboard using the identifier that you set in the IB Attributes Inspector EDITED to add example code UIStoryboard mainStoryboard UIStoryboard storyboardWithName @ MainStoryboard bundle..
Storyboard and Switch Views? http://stackoverflow.com/questions/8319002/storyboard-and-switch-views instantiateViewControllerWithIdentifier @ IDENTIFIER IDENTIFIER is defined in your storyboard it's in the Utilities Attributes Inspector on the right side. HOWEVER your real problem is that you shouldn't be loading from the storyboard at all. you..
How can I manually switch between UIViewControllers in storyboard? http://stackoverflow.com/questions/8348109/how-can-i-manually-switch-between-uiviewcontrollers-in-storyboard new viewcontroller and then push it onto your navigationController. To set the identifier choose your view open the Attributes Inspector and set the identifier LoginIdentifier in my example . Then you can do this LoginViewController controller self.storyboard..
XCode: Displaying a UIDatePicker when user clicks on UITextbox http://stackoverflow.com/questions/8974131/xcode-displaying-a-uidatepicker-when-user-clicks-on-uitextbox I don't understand why Apple didn't just make the UIDatePicker one of the default options in the drop down list in the Attributes Inspector for the UITextView control. That would have made this so much easier. Below is some of the code from my implementation..
iOS: Access app-info.plist variables in code http://stackoverflow.com/questions/9530075/ios-access-app-info-plist-variables-in-code NSDictionary of all values in app info.plist iphone objective c ios ipad info.plist share improve this question Attributes from the info.plist for your project are directly accessible by the following... NSBundle mainBundle objectForInfoDictionaryKey..
|