¡@

Home 

2014/10/15 ¤U¤È 10:13:12

iphone Programming Glossary: recommend

Add UIPickerView & a Button in Action sheet - How?

http://stackoverflow.com/questions/1262574/add-uipickerview-a-button-in-action-sheet-how

UIActionSheet is not designed to be subclassed nor should you add views to its hierarchy I recommend against trying to customize the contents of an ActionSheet as it can lead to serious invalid context..

Get to UIViewController from UIView on iPhone?

http://stackoverflow.com/questions/1340434/get-to-uiviewcontroller-from-uiview-on-iphone

in different contexts. Should you need the view to interface in a way with the view controller the recommended way and what Apple does across Cocoa is to use the delegate pattern. An example of how to implement.. view controller or in any other class that you end up using. My original answer follows I don't recommend this neither the rest of the answers where direct access to the view controller is achieved There is.. around it by adding a IBOutlet on the UIView and connecting these in Interface Builder this is not recommended. The view should not know about the view controller. Instead you should do as @Phil M suggests and..

Objective-C: Best way to access REST API on your iphone

http://stackoverflow.com/questions/1557040/objective-c-best-way-to-access-rest-api-on-your-iphone

REST location iphone objective c web services rest share improve this question I would recommend checking out RestKit http restkit.org It provides an excellent API for accessing RESTful web services..

JSON and Core Data on the iPhone

http://stackoverflow.com/questions/2362323/json-and-core-data-on-the-iphone

relationship . I was curious as a relatively inexperienced iPhone developer whether anyone could recommend an approach and a suitable JSON implementation for the iPhone which would allow me to 1 convert the..

underline text in UIlabel

http://stackoverflow.com/questions/2711297/underline-text-in-uilabel

@ 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 to underline one..

Popover with embedded navigation controller doesn't respect size on back nav

http://stackoverflow.com/questions/2752394/popover-with-embedded-navigation-controller-doesnt-respect-size-on-back-nav

gives very strange animation when let's say you popController inside the popover I'd not recommend it For me setting the hardcoded size inside the controller would not work at all my controllers have..

Is it even possible to change a UIButtons background color?

http://stackoverflow.com/questions/2808888/is-it-even-possible-to-change-a-uibuttons-background-color

Install xCode 3.2.3 w/ iPhone SDK 4, get “Base SDK missing”, can't see other SDKs

http://stackoverflow.com/questions/3161385/install-xcode-3-2-3-w-iphone-sdk-4-get-base-sdk-missing-cant-see-other-sdk

fix the specific Base SDK Missing problem. You can skip to the bottom for just the fix though I recommend reading all of this. I also recommend John Muchow's excellent take on this issue. If you are specifically.. You can skip to the bottom for just the fix though I recommend reading all of this. I also recommend John Muchow's excellent take on this issue. If you are specifically interested in the Xcode 3.2.4 upgrade.. iOS3.2 and iOS4 code . If you are planning on conditionally using 4.0 features this is a strong recommendation to check it out. Fixing Base SDK Missing Load your project From the menu select Project Edit Project..

Apple gyroscope sample code

http://stackoverflow.com/questions/3245733/apple-gyroscope-sample-code

this question To get gyro updates you need to create a motion manager object and optionally but recommended a reference attitude object So in your interface definition you add CMMotionManager motionManager.. According to the docs you should only create one of these managers per application. I recommend making the motionManager accesible through a singleton but thats some extra work which you might not..

Build fat static library (device + simulator) using Xcode and SDK 4+

http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4

Info on how to use this script with a project embedded in another project although I highly recommend NOT doing that ever Apple has a couple of show stopper bugs in Xcode if you embed projects inside each..

How to make a transparent UIWebView

http://stackoverflow.com/questions/3646930/how-to-make-a-transparent-uiwebview

Can you help me Thanks in advance iphone cocoa touch uiwebview share improve this question I recommend webView.opaque NO webView.backgroundColor UIColor clearColor setting these properties in Interface Builder..

parsing HTML on the iPhone [closed]

http://stackoverflow.com/questions/405749/parsing-html-on-the-iphone

HTML on the iPhone closed Can anyone recommend a C or Objective C library for HTML parsing It needs to handle messy HTML code that won't quite validate... this option probably is not the most efficient. If performance is an issue in your project I recommend to code your own lightweight solution based on hpple and xpathquery library code. share improve this..

Want to display a 3D model on the iPhone: how to get started?

http://stackoverflow.com/questions/413919/want-to-display-a-3d-model-on-the-iphone-how-to-get-started

some simpler iphone apps tutorials just to get your footing on obj c and xcode etc. For that I recommend the pragmatic programmer's iphone book which has enough information to get started I started with no..

Change User Agent in UIWebView (iPhone SDK)

http://stackoverflow.com/questions/478387/change-user-agent-in-uiwebview-iphone-sdk

browser in a Windows app iphone cocoa touch share improve this question With iOS 5 changes I recommend the following approach originally from this StackOverflow question UIWebView iOS5 changing user agent..

Can I use CGAffineTransformMakeRotation to rotate a view more than 360 degrees?

http://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees

or do I have to switch to another technology If I have to switch to another technology would you recommend using another thread or a timer to do the animation myself or would OpenGL be a better route to go Thanks..

To ARC or not to ARC? What are the pros and cons?

http://stackoverflow.com/questions/8760431/to-arc-or-not-to-arc-what-are-the-pros-and-cons

comes as a result outweigh any 'cost' of using ARC What are your experiences of ARC and would you recommend it So How much benefit can ARC bring to a project Does ARC have a cost like garbage collection in Java..

How can I get a precise time, for example in milliseconds in Objective-C?

http://stackoverflow.com/questions/889380/how-can-i-get-a-precise-time-for-example-in-milliseconds-in-objective-c

. There are many other ways to calculate this interval using NSDate and I would recommend looking at the class documentation for NSDate which is found in NSDate Class Reference . share improve..

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

a large image that you need to redraw often then there are alternatives although the one I would recommend primarily is to avoid redrawing that large image . With respect to the general behavior of the cache..

Add UIPickerView & a Button in Action sheet - How?

http://stackoverflow.com/questions/1262574/add-uipickerview-a-button-in-action-sheet-how

this question Update for iOS 7 Apple docs for UIActionSheet UIActionSheet is not designed to be subclassed nor should you add views to its hierarchy I recommend against trying to customize the contents of an ActionSheet as it can lead to serious invalid context errors in iOS 7. I just spent a few hours working through this..

Get to UIViewController from UIView on iPhone?

http://stackoverflow.com/questions/1340434/get-to-uiviewcontroller-from-uiview-on-iphone

be independent of the view controller and be able to work in different contexts. Should you need the view to interface in a way with the view controller the recommended way and what Apple does across Cocoa is to use the delegate pattern. An example of how to implement it follows @protocol MyViewDelegate NSObject void viewActionHappened.. for instance and it doesn't care if its implemented in the view controller or in any other class that you end up using. My original answer follows I don't recommend this neither the rest of the answers where direct access to the view controller is achieved There is no built in way to do it. While you can get around it by adding.. There is no built in way to do it. While you can get around it by adding a IBOutlet on the UIView and connecting these in Interface Builder this is not recommended. The view should not know about the view controller. Instead you should do as @Phil M suggests and create a protocol to be used as the delegate. share improve..

Objective-C: Best way to access REST API on your iphone

http://stackoverflow.com/questions/1557040/objective-c-best-way-to-access-rest-api-on-your-iphone

another way of testing or accessing with authentication a network REST location iphone objective c web services rest share improve this question I would recommend checking out RestKit http restkit.org It provides an excellent API for accessing RESTful web services and representing the remote resources as local objects including..

JSON and Core Data on the iPhone

http://stackoverflow.com/questions/2362323/json-and-core-data-on-the-iphone

object graph consisting of two entities linked by a to many relationship . I was curious as a relatively inexperienced iPhone developer whether anyone could recommend an approach and a suitable JSON implementation for the iPhone which would allow me to 1 convert the core data records into a JSON string whilst maintaining the..

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 rather than underline label manually. However if you need to underline one line UILabel and don't want to use third party components code..

Popover with embedded navigation controller doesn't respect size on back nav

http://stackoverflow.com/questions/2752394/popover-with-embedded-navigation-controller-doesnt-respect-size-on-back-nav

does not restore Changing size of the popover in viewWillAppear gives very strange animation when let's say you popController inside the popover I'd not recommend it For me setting the hardcoded size inside the controller would not work at all my controllers have to be sometimes big sometimes small controller that will present..

Is it even possible to change a UIButtons background color?

http://stackoverflow.com/questions/2808888/is-it-even-possible-to-change-a-uibuttons-background-color

Install xCode 3.2.3 w/ iPhone SDK 4, get “Base SDK missing”, can't see other SDKs

http://stackoverflow.com/questions/3161385/install-xcode-3-2-3-w-iphone-sdk-4-get-base-sdk-missing-cant-see-other-sdk

I'm going to explain why this is going on and then how fix the specific Base SDK Missing problem. You can skip to the bottom for just the fix though I recommend reading all of this. I also recommend John Muchow's excellent take on this issue. If you are specifically interested in the Xcode 3.2.4 upgrade which has a strongly.. is going on and then how fix the specific Base SDK Missing problem. You can skip to the bottom for just the fix though I recommend reading all of this. I also recommend John Muchow's excellent take on this issue. If you are specifically interested in the Xcode 3.2.4 upgrade which has a strongly related problem you might want to.. conditional code entitled Tips Tricks for conditional iOS3 iOS3.2 and iOS4 code . If you are planning on conditionally using 4.0 features this is a strong recommendation to check it out. Fixing Base SDK Missing Load your project From the menu select Project Edit Project Settings... Under Architecture Base SDK choose one of..

Apple gyroscope sample code

http://stackoverflow.com/questions/3245733/apple-gyroscope-sample-code

sample available.. iphone cocoa touch ios4 share improve this question To get gyro updates you need to create a motion manager object and optionally but recommended a reference attitude object So in your interface definition you add CMMotionManager motionManager CMAttitude referenceAttitude According to the docs you should.. you add CMMotionManager motionManager CMAttitude referenceAttitude According to the docs you should only create one of these managers per application. I recommend making the motionManager accesible through a singleton but thats some extra work which you might not need to do if you only instantiate your class once. Then in..

Build fat static library (device + simulator) using Xcode and SDK 4+

http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4

it converts your library into a Framework . RECENT CHANGES Info on how to use this script with a project embedded in another project although I highly recommend NOT doing that ever Apple has a couple of show stopper bugs in Xcode if you embed projects inside each other from Xcode 3.x through to Xcode 4.6.x Bonus script..

How to make a transparent UIWebView

http://stackoverflow.com/questions/3646930/how-to-make-a-transparent-uiwebview

the UIwebView's opacity to zero in IB but it didn't help. Can you help me Thanks in advance iphone cocoa touch uiwebview share improve this question I recommend webView.opaque NO webView.backgroundColor UIColor clearColor setting these properties in Interface Builder will work for iOS 5.0 but for iOS 4.3 you must set the..

parsing HTML on the iPhone [closed]

http://stackoverflow.com/questions/405749/parsing-html-on-the-iphone

HTML on the iPhone closed Can anyone recommend a C or Objective C library for HTML parsing It needs to handle messy HTML code that won't quite validate. Does such a library exist or am I better off just trying..

Want to display a 3D model on the iPhone: how to get started?

http://stackoverflow.com/questions/413919/want-to-display-a-3d-model-on-the-iphone-how-to-get-started

share improve this question You should probably start with some simpler iphone apps tutorials just to get your footing on obj c and xcode etc. For that I recommend the pragmatic programmer's iphone book which has enough information to get started I started with no knowledge of xcode obj c iphone or mac and got to a working..

Change User Agent in UIWebView (iPhone SDK)

http://stackoverflow.com/questions/478387/change-user-agent-in-uiwebview-iphone-sdk

SDK's UIWebView control the way it is say for an embedded IE browser in a Windows app iphone cocoa touch share improve this question With iOS 5 changes I recommend the following approach originally from this StackOverflow question UIWebView iOS5 changing user agent as pointed out in an answer below. In comments on that page..

Can I use CGAffineTransformMakeRotation to rotate a view more than 360 degrees?

http://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees

possible to get a 720 rotation using CGAffineTransformRotate or do I have to switch to another technology If I have to switch to another technology would you recommend using another thread or a timer to do the animation myself or would OpenGL be a better route to go Thanks Blake. iphone cocoa touch core animation core graphics..

To ARC or not to ARC? What are the pros and cons?

http://stackoverflow.com/questions/8760431/to-arc-or-not-to-arc-what-are-the-pros-and-cons

releasing manually and presumably more reliable code that comes as a result outweigh any 'cost' of using ARC What are your experiences of ARC and would you recommend it So How much benefit can ARC bring to a project Does ARC have a cost like garbage collection in Java Have you been using ARC and if so how have you found it so..

How can I get a precise time, for example in milliseconds in Objective-C?

http://stackoverflow.com/questions/889380/how-can-i-get-a-precise-time-for-example-in-milliseconds-in-objective-c

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

likely for longer than you need it. However if you do have a large image that you need to redraw often then there are alternatives although the one I would recommend primarily is to avoid redrawing that large image . With respect to the general behavior of the cache it does cache based on filename so two instances of imageNamed..

Add UIPickerView & a Button in Action sheet - How?

http://stackoverflow.com/questions/1262574/add-uipickerview-a-button-in-action-sheet-how

docs for UIActionSheet UIActionSheet is not designed to be subclassed nor should you add views to its hierarchy I recommend against trying to customize the contents of an ActionSheet as it can lead to serious invalid context errors in iOS 7. I..

Get to UIViewController from UIView on iPhone?

http://stackoverflow.com/questions/1340434/get-to-uiviewcontroller-from-uiview-on-iphone

and be able to work in different contexts. Should you need the view to interface in a way with the view controller the recommended way and what Apple does across Cocoa is to use the delegate pattern. An example of how to implement it follows @protocol.. its implemented in the view controller or in any other class that you end up using. My original answer follows I don't recommend this neither the rest of the answers where direct access to the view controller is achieved There is no built in way to.. While you can get around it by adding a IBOutlet on the UIView and connecting these in Interface Builder this is not recommended. The view should not know about the view controller. Instead you should do as @Phil M suggests and create a protocol to..

Objective-C: Best way to access REST API on your iphone

http://stackoverflow.com/questions/1557040/objective-c-best-way-to-access-rest-api-on-your-iphone

authentication a network REST location iphone objective c web services rest share improve this question I would recommend checking out RestKit http restkit.org It provides an excellent API for accessing RESTful web services and representing the..

JSON and Core Data on the iPhone

http://stackoverflow.com/questions/2362323/json-and-core-data-on-the-iphone

linked by a to many relationship . I was curious as a relatively inexperienced iPhone developer whether anyone could recommend an approach and a suitable JSON implementation for the iPhone which would allow me to 1 convert the core data records into..

underline text in UIlabel

http://stackoverflow.com/questions/2711297/underline-text-in-uilabel

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 to underline one line UILabel and don't..

Popover with embedded navigation controller doesn't respect size on back nav

http://stackoverflow.com/questions/2752394/popover-with-embedded-navigation-controller-doesnt-respect-size-on-back-nav

the popover in viewWillAppear gives very strange animation when let's say you popController inside the popover I'd not recommend it For me setting the hardcoded size inside the controller would not work at all my controllers have to be sometimes big..

Is it even possible to change a UIButtons background color?

http://stackoverflow.com/questions/2808888/is-it-even-possible-to-change-a-uibuttons-background-color

Install xCode 3.2.3 w/ iPhone SDK 4, get “Base SDK missing”, can't see other SDKs

http://stackoverflow.com/questions/3161385/install-xcode-3-2-3-w-iphone-sdk-4-get-base-sdk-missing-cant-see-other-sdk

going on and then how fix the specific Base SDK Missing problem. You can skip to the bottom for just the fix though I recommend reading all of this. I also recommend John Muchow's excellent take on this issue. If you are specifically interested in.. Base SDK Missing problem. You can skip to the bottom for just the fix though I recommend reading all of this. I also recommend John Muchow's excellent take on this issue. If you are specifically interested in the Xcode 3.2.4 upgrade which has a strongly.. for conditional iOS3 iOS3.2 and iOS4 code . If you are planning on conditionally using 4.0 features this is a strong recommendation to check it out. Fixing Base SDK Missing Load your project From the menu select Project Edit Project Settings... Under..

Apple gyroscope sample code

http://stackoverflow.com/questions/3245733/apple-gyroscope-sample-code

ios4 share improve this question To get gyro updates you need to create a motion manager object and optionally but recommended a reference attitude object So in your interface definition you add CMMotionManager motionManager CMAttitude referenceAttitude.. CMAttitude referenceAttitude According to the docs you should only create one of these managers per application. I recommend making the motionManager accesible through a singleton but thats some extra work which you might not need to do if you only..

Build fat static library (device + simulator) using Xcode and SDK 4+

http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4

Framework . RECENT CHANGES Info on how to use this script with a project embedded in another project although I highly recommend NOT doing that ever Apple has a couple of show stopper bugs in Xcode if you embed projects inside each other from Xcode..

How to make a transparent UIWebView

http://stackoverflow.com/questions/3646930/how-to-make-a-transparent-uiwebview

but it didn't help. Can you help me Thanks in advance iphone cocoa touch uiwebview share improve this question I recommend webView.opaque NO webView.backgroundColor UIColor clearColor setting these properties in Interface Builder will work for..

parsing HTML on the iPhone [closed]

http://stackoverflow.com/questions/405749/parsing-html-on-the-iphone

HTML on the iPhone closed Can anyone recommend a C or Objective C library for HTML parsing It needs to handle messy HTML code that won't quite validate. Does such a library..

Want to display a 3D model on the iPhone: how to get started?

http://stackoverflow.com/questions/413919/want-to-display-a-3d-model-on-the-iphone-how-to-get-started

probably start with some simpler iphone apps tutorials just to get your footing on obj c and xcode etc. For that I recommend the pragmatic programmer's iphone book which has enough information to get started I started with no knowledge of xcode..

Change User Agent in UIWebView (iPhone SDK)

http://stackoverflow.com/questions/478387/change-user-agent-in-uiwebview-iphone-sdk

for an embedded IE browser in a Windows app iphone cocoa touch share improve this question With iOS 5 changes I recommend the following approach originally from this StackOverflow question UIWebView iOS5 changing user agent as pointed out in..

Can I use CGAffineTransformMakeRotation to rotate a view more than 360 degrees?

http://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees

or do I have to switch to another technology If I have to switch to another technology would you recommend using another thread or a timer to do the animation myself or would OpenGL be a better route to go Thanks Blake. iphone..

To ARC or not to ARC? What are the pros and cons?

http://stackoverflow.com/questions/8760431/to-arc-or-not-to-arc-what-are-the-pros-and-cons

reliable code that comes as a result outweigh any 'cost' of using ARC What are your experiences of ARC and would you recommend it So How much benefit can ARC bring to a project Does ARC have a cost like garbage collection in Java Have you been using..

How can I get a precise time, for example in milliseconds in Objective-C?

http://stackoverflow.com/questions/889380/how-can-i-get-a-precise-time-for-example-in-milliseconds-in-objective-c

Dispelling the UIImage imageNamed: FUD

http://stackoverflow.com/questions/924740/dispelling-the-uiimage-imagenamed-fud

if you do have a large image that you need to redraw often then there are alternatives although the one I would recommend primarily is to avoid redrawing that large image . With respect to the general behavior of the cache it does cache based..