¡@

Home 

2014/10/15 ¤U¤È 10:14:11

iphone Programming Glossary: shouldn't

How to detect iPhone 5 (widescreen devices)?

http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices

I do that iphone ios objective c screen device share improve this question First of all you shouldn't rebuild all your views to fit a new screen nor use different views for different screen sizes. Use the..

Cropping a UIImage

http://stackoverflow.com/questions/158914/cropping-a-uiimage

context. I was hoping this was Kosher but am I instead attempting to draw over other memory that I shouldn't be touching Theory 2 I'm doing all of this in a background thread. I know there are portions of UIKit..

Creating a left-arrow button (like UINavigationBar's “back” style) on a UIToolbar

http://stackoverflow.com/questions/227078/creating-a-left-arrow-button-like-uinavigationbars-back-style-on-a-uitoolba

and color scheme I intend to use Update PLEASE STOP dodging the question and suggesting that I shouldn't be asking this and should be using UINavigationBar. My app is Instapaper Pro. It shows only a bottom.. content area and I wish to put a left arrow shaped Back button in the bottom. Telling me that I shouldn't need to do this is not an answer and certainly doesn't deserve a bounty. iphone ios cocoa touch share..

How to resize a UIPresentationFormSheet?

http://stackoverflow.com/questions/2457947/how-to-resize-a-uipresentationformsheet

targetController.modalTransitionStyle UIModalTransitionStyleFlipHorizontal transition shouldn't matter self presentModalViewController targetController animated YES targetController.view.superview.frame..

Exit application in iOS 4.0

http://stackoverflow.com/questions/3097244/exit-application-in-ios-4-0

it now OK with apple and how can it be done iphone ios4 share improve this question No still shouldn't do this. You have handlers for the different stages so this is how you should do it. There's no point..

What's the best way to communicate between view controllers?

http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers

context of the dependency injection design pattern. In a nutshell this means that your controller shouldn't look up the objects it needs to do its job e.g. reference a global variable . Instead you should always..

iOS 5 Best Practice (Release/retain?)

http://stackoverflow.com/questions/6308425/ios-5-best-practice-release-retain

file basis. See pixelfreak 's answer . So my advice still stands but now the 3rd party libraries shouldn't need to be updated to work with ARC. Here's what Apple says about opting out of ARC for specific files..

Understanding reference counting with Cocoa and Objective-C

http://stackoverflow.com/questions/6578/understanding-reference-counting-with-cocoa-and-objective-c

as programmers it takes care of calling release for us so we don't have to and in fact we shouldn't . What's important to note is that again by convention all object creation class methods return an autoreleased.. @ Hello World Now what We want to return s but we've upped its reference count. The caller shouldn't be responsible for releasing it since we're the ones that created it. If we call release however the..

Property vs. instance variable

http://stackoverflow.com/questions/719788/property-vs-instance-variable

now to distinguish between ivars and getters setters. The accessors have got the self. prefix. You shouldn't access the variables directly anyway. Your sample code doesn't work as it should be _myVar some_other_object..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

iCloud users As I understand iCloud it will save a local copy of text.txt automatically. So there shouldn't be any need for me save anything into the 'old' sandbox of my app i.e. as it used to be in the old pre..

`[super viewDidLoad]` convention

http://stackoverflow.com/questions/844195/super-viewdidload-convention

you code This could have consequences depending on what super's implementation does. Though you shouldn't have to know super's implementation to write yours. Of course this goes for all of UIViewControllers..

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

varargs can also cause trouble. Most things involving math on an ObjC pointer is trickier. You shouldn't have much of this in any case. You cannot put an id in a struct . This is fairly rare but sometimes..

How to detect iPhone 5 (widescreen devices)?

http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices

with 3.5 or 4 screen and then apply the view. How should I do that iphone ios objective c screen device share improve this question First of all you shouldn't rebuild all your views to fit a new screen nor use different views for different screen sizes. Use the auto resizing capabilities of iOS so your views can adjust..

Cropping a UIImage

http://stackoverflow.com/questions/158914/cropping-a-uiimage

to something that's larger than the bounds of my image context. I was hoping this was Kosher but am I instead attempting to draw over other memory that I shouldn't be touching Theory 2 I'm doing all of this in a background thread. I know there are portions of UIKit that are restricted to the main thread. I was assuming hoping..

Creating a left-arrow button (like UINavigationBar's “back” style) on a UIToolbar

http://stackoverflow.com/questions/227078/creating-a-left-arrow-button-like-uinavigationbars-back-style-on-a-uitoolba

results. Any ideas beyond screenshotting for every size and color scheme I intend to use Update PLEASE STOP dodging the question and suggesting that I shouldn't be asking this and should be using UINavigationBar. My app is Instapaper Pro. It shows only a bottom toolbar to save space and maximize readable content area and.. only a bottom toolbar to save space and maximize readable content area and I wish to put a left arrow shaped Back button in the bottom. Telling me that I shouldn't need to do this is not an answer and certainly doesn't deserve a bounty. iphone ios cocoa touch share improve this question I used the following psd that I..

How to resize a UIPresentationFormSheet?

http://stackoverflow.com/questions/2457947/how-to-resize-a-uipresentationformsheet

targetController.modalPresentationStyle UIModalPresentationFormSheet targetController.modalTransitionStyle UIModalTransitionStyleFlipHorizontal transition shouldn't matter self presentModalViewController targetController animated YES targetController.view.superview.frame CGRectInset targetController.view.superview.frame 100..

Exit application in iOS 4.0

http://stackoverflow.com/questions/3097244/exit-application-in-ios-4-0

way for the user to exit the app like an exit button. is it now OK with apple and how can it be done iphone ios4 share improve this question No still shouldn't do this. You have handlers for the different stages so this is how you should do it. There's no point in exiting manually. If you restart the app ideally it would..

What's the best way to communicate between view controllers?

http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers

are much easier to understand if you think about them in the context of the dependency injection design pattern. In a nutshell this means that your controller shouldn't look up the objects it needs to do its job e.g. reference a global variable . Instead you should always inject those dependencies into the controller i.e. pass..

iOS 5 Best Practice (Release/retain?)

http://stackoverflow.com/questions/6308425/ios-5-best-practice-release-retain

Edit I recently discovered that you can turn off ARC on a per file basis. See pixelfreak 's answer . So my advice still stands but now the 3rd party libraries shouldn't need to be updated to work with ARC. Here's what Apple says about opting out of ARC for specific files When you migrate a project to use ARC the fobjc arc compiler..

Understanding reference counting with Cocoa and Objective-C

http://stackoverflow.com/questions/6578/understanding-reference-counting-with-cocoa-and-objective-c

event loop it can call release on the object. From our perspective as programmers it takes care of calling release for us so we don't have to and in fact we shouldn't . What's important to note is that again by convention all object creation class methods return an autoreleased object. For example in the following example the.. createHelloWorldString NSString s NSString alloc initWithString @ Hello World Now what We want to return s but we've upped its reference count. The caller shouldn't be responsible for releasing it since we're the ones that created it. If we call release however the reference count will hit zero and bad memory will be returned..

Property vs. instance variable

http://stackoverflow.com/questions/719788/property-vs-instance-variable

value value retain _name release _name value It's easy now to distinguish between ivars and getters setters. The accessors have got the self. prefix. You shouldn't access the variables directly anyway. Your sample code doesn't work as it should be _myVar some_other_object _myVar is the ivar not myVar. self.myVar some_other_object..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

copy of text.txt into my sandbox Will this work for non iCloud users As I understand iCloud it will save a local copy of text.txt automatically. So there shouldn't be any need for me save anything into the 'old' sandbox of my app i.e. as it used to be in the old pre iCloud days . Right now my sandbox is totally empty but I..

`[super viewDidLoad]` convention

http://stackoverflow.com/questions/844195/super-viewdidload-convention

. When you do call it is it expected before or after you code This could have consequences depending on what super's implementation does. Though you shouldn't have to know super's implementation to write yours. Of course this goes for all of UIViewControllers delegate methods willAppear didAppear etc... Any thoughts ..

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

more thinking about to do correctly. Fancy handling of ObjC varargs can also cause trouble. Most things involving math on an ObjC pointer is trickier. You shouldn't have much of this in any case. You cannot put an id in a struct . This is fairly rare but sometimes it's used to pack data. If you did not follow correct KVC naming..

How to detect iPhone 5 (widescreen devices)?

http://stackoverflow.com/questions/12446990/how-to-detect-iphone-5-widescreen-devices

the view. How should I do that iphone ios objective c screen device share improve this question First of all you shouldn't rebuild all your views to fit a new screen nor use different views for different screen sizes. Use the auto resizing capabilities..

Multiple UITableViews on one UIView

http://stackoverflow.com/questions/1416372/multiple-uitableviews-on-one-uiview

Cropping a UIImage

http://stackoverflow.com/questions/158914/cropping-a-uiimage

bounds of my image context. I was hoping this was Kosher but am I instead attempting to draw over other memory that I shouldn't be touching Theory 2 I'm doing all of this in a background thread. I know there are portions of UIKit that are restricted..

Creating a left-arrow button (like UINavigationBar's “back” style) on a UIToolbar

http://stackoverflow.com/questions/227078/creating-a-left-arrow-button-like-uinavigationbars-back-style-on-a-uitoolba

for every size and color scheme I intend to use Update PLEASE STOP dodging the question and suggesting that I shouldn't be asking this and should be using UINavigationBar. My app is Instapaper Pro. It shows only a bottom toolbar to save space.. and maximize readable content area and I wish to put a left arrow shaped Back button in the bottom. Telling me that I shouldn't need to do this is not an answer and certainly doesn't deserve a bounty. iphone ios cocoa touch share improve this question..

How to resize a UIPresentationFormSheet?

http://stackoverflow.com/questions/2457947/how-to-resize-a-uipresentationformsheet

UIModalPresentationFormSheet targetController.modalTransitionStyle UIModalTransitionStyleFlipHorizontal transition shouldn't matter self presentModalViewController targetController animated YES targetController.view.superview.frame CGRectInset targetController.view.superview.frame..

Exit application in iOS 4.0

http://stackoverflow.com/questions/3097244/exit-application-in-ios-4-0

an exit button. is it now OK with apple and how can it be done iphone ios4 share improve this question No still shouldn't do this. You have handlers for the different stages so this is how you should do it. There's no point in exiting manually...

streaming video FROM an iPhone

http://stackoverflow.com/questions/3444791/streaming-video-from-an-iphone

If you use AVCaptureSession 's beginConfiguration and commitConfiguration methods to batch your output change you shouldn't drop any frames between the files. This has many advantages over frame by frame upload The files can be directly used for..

iphone how to get crash log from customers?

http://stackoverflow.com/questions/3844482/iphone-how-to-get-crash-log-from-customers

this won't crash. Parse the crash report and send it to the server. If it crashes now the file has been deleted so it shouldn't happen again. Finally enable crash reporting so if it crashes in steps 1 or 2 the crash isn't logged . In any case you should..

Non-retaining array for delegates

http://stackoverflow.com/questions/4692161/non-retaining-array-for-delegates

create an NSArray for these delegates the problem is that NSArray would have all these delegates retained which it shouldn't by convention objects should not retain their delegates . Should I write my own array class to prevent retaining or are..

How to create custom easing function with Core Animation?

http://stackoverflow.com/questions/5161465/how-to-create-custom-easing-function-with-core-animation

Yes it's possible to do line bouncing by creating and joining four line segments which goes back and forth but that shouldn't be necessary. After all it's just a simple linear function which maps time values to positions. I hope I'm making sense..

Why does viewWillAppear not get called when an app comes back from the background?

http://stackoverflow.com/questions/5277940/why-does-viewwillappear-not-get-called-when-an-app-comes-back-from-the-backgroun

isn't called. I recommend against calling the viewWillAppear yourself it has a specific meaning which you shouldn't subvert A refactoring you can do to achieve the same effect might be as follows void viewWillAppear BOOL animated self doMyLayoutStuff..

What's the best way to communicate between view controllers?

http://stackoverflow.com/questions/569940/whats-the-best-way-to-communicate-between-view-controllers

about them in the context of the dependency injection design pattern. In a nutshell this means that your controller shouldn't look up the objects it needs to do its job e.g. reference a global variable . Instead you should always inject those dependencies..

iOS 5 Best Practice (Release/retain?)

http://stackoverflow.com/questions/6308425/ios-5-best-practice-release-retain

turn off ARC on a per file basis. See pixelfreak 's answer . So my advice still stands but now the 3rd party libraries shouldn't need to be updated to work with ARC. Here's what Apple says about opting out of ARC for specific files When you migrate..

Understanding reference counting with Cocoa and Objective-C

http://stackoverflow.com/questions/6578/understanding-reference-counting-with-cocoa-and-objective-c

object. From our perspective as programmers it takes care of calling release for us so we don't have to and in fact we shouldn't . What's important to note is that again by convention all object creation class methods return an autoreleased object... alloc initWithString @ Hello World Now what We want to return s but we've upped its reference count. The caller shouldn't be responsible for releasing it since we're the ones that created it. If we call release however the reference count will..

Property vs. instance variable

http://stackoverflow.com/questions/719788/property-vs-instance-variable

value It's easy now to distinguish between ivars and getters setters. The accessors have got the self. prefix. You shouldn't access the variables directly anyway. Your sample code doesn't work as it should be _myVar some_other_object _myVar is the..

iCloud basics and code sample [closed]

http://stackoverflow.com/questions/7795629/icloud-basics-and-code-sample

this work for non iCloud users As I understand iCloud it will save a local copy of text.txt automatically. So there shouldn't be any need for me save anything into the 'old' sandbox of my app i.e. as it used to be in the old pre iCloud days . Right..

`[super viewDidLoad]` convention

http://stackoverflow.com/questions/844195/super-viewdidload-convention

before or after you code This could have consequences depending on what super's implementation does. Though you shouldn't have to know super's implementation to write yours. Of course this goes for all of UIViewControllers delegate methods willAppear..

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

Fancy handling of ObjC varargs can also cause trouble. Most things involving math on an ObjC pointer is trickier. You shouldn't have much of this in any case. You cannot put an id in a struct . This is fairly rare but sometimes it's used to pack data...

Why is the Xcode compiler not warning me about invalid methods for my Deployment Target?

http://stackoverflow.com/questions/10130655/why-is-the-xcode-compiler-not-warning-me-about-invalid-methods-for-my-deployment

setBackgroundImage tabBackground Invalid in iOS 4.x The compiler is not giving me any warnings. Shouldn't it What will this do when executed on an iOS 4.0 device Sadly I don't have one to test on currently. This makes me extremely..

Where are the iOS frameworks binaries located in the filesystem?

http://stackoverflow.com/questions/10830488/where-are-the-ios-frameworks-binaries-located-in-the-filesystem

device the frameworks directories in System Library Frameworks don't contain the dynamic library. How is this possible Shouldn't it be present to be loaded in memory when the application requiring it is launched iphone ios jailbreak share improve..

What's the trick to pass an event to the next responder in the responder chain?

http://stackoverflow.com/questions/1207287/whats-the-trick-to-pass-an-event-to-the-next-responder-in-the-responder-chain

modify this UIView from the view controller. it's nothing custom. And it doesn't implement any touch event handling. Shouldn't the message get passed on to the view controller How could I just let it pass If I remove the event handling code in MyView..

Writing video + generated audio to AVAssetWriterInput, audio stuttering

http://stackoverflow.com/questions/12187124/writing-video-generated-audio-to-avassetwriterinput-audio-stuttering

it throws . As far as I can tell I'm calculating the PTS correctly. Why is this even required for the audio channel Shouldn't the video be synced to the audio clock Update I've tried providing the audio in fixed blocks of 1024 samples since this..

iPhone GPS in background never resumes after pause

http://stackoverflow.com/questions/17484352/iphone-gps-in-background-never-resumes-after-pause

NSArray locations Why is locationManagerDidResumeLocationUpdates never called after device starts moving again Shouldn't GPS resume automatically also since was paused automatically Is there a way to resume GPS without user's interaction Application..

How to use Git properly with XCode?

http://stackoverflow.com/questions/2615378/how-to-use-git-properly-with-xcode

file added to their xcode project when they pull. Then if one of them builds a release this file may not be included. Shouldn't I just let git handle the merges for the project file Could someone please explain why or why not this file should be in..

NSXMLParserDelegate and iPhone SDK 3.1.X

http://stackoverflow.com/questions/3081595/nsxmlparserdelegate-and-iphone-sdk-3-1-x

3.1.2 devices This is strange because my beta testers who are using 3.1.3 and I think 3.1.2 said the app works fine. Shouldn't it crash if it can't compile against base SDK of 3.1.2 I think this should be ok to discuss in regards to the 4.0 NDA as..

iphone uiview - resize frame to fit subviews

http://stackoverflow.com/questions/3605393/iphone-uiview-resize-frame-to-fit-subviews

uiview resize frame to fit subviews Shouldn't there be a way to resize the frame of a UIView after you've added subviews so that the frame is the size needed to enclose..

Twitter-esque UITabBarController?

http://stackoverflow.com/questions/3664208/twitter-esque-uitabbarcontroller

a subclass of the standard UITabBarController and add a couple of subviews for the blue light and the sliding arrow. Shouldn't be too hard to accomplish. Edit Here's an idea of some of the stuff that should go in your subclass. I don't even know if..

Why is UIView exclusiveTouch property not blocking?

http://stackoverflow.com/questions/3946147/why-is-uiview-exclusivetouch-property-not-blocking

kMK_AnimationStyleScaleFromCenter Set as modal self.orderSetNameView.exclusiveTouch YES Shouldn't orderSetNameView block touch events in all other views What am I missing iphone ipad uiview share improve this question..

Why doesn't dismissWithClickedButtonIndex ever call clickedButtonAtIndex?

http://stackoverflow.com/questions/4472854/why-doesnt-dismisswithclickedbuttonindex-ever-call-clickedbuttonatindex

I'm using dismissWithClickedButtonIndex to simulate an OK click... but then clickedButtonAtIndex never gets called. Shouldn't dismissWithClickedButtonIndex also call clickedButtonAtIndex I'm trying to get clickedButtonAtIndex to get called if CANCEL..

'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the GameView nib but the view outlet was not set

http://stackoverflow.com/questions/5464010/nsinternalinconsistencyexception-reason-uiviewcontroller-loadviewfromnib

is what brings up this error but I don't understand where it gets the idea to try and load GameView.xib . Shouldn't it use GameViewController.xib instead If I grep my project directory I do see it referenced from UserInterfaceState.xcuserstate..

How can I write an iPhone app entirely in JavaScript without making it just a web app?

http://stackoverflow.com/questions/64420/how-can-i-write-an-iphone-app-entirely-in-javascript-without-making-it-just-a-we

it just a web app I don't want to take the time to learn Obj C. I've spent 7 years doing web application programming. Shouldn't there be a way to use the WebView and just write the whole app in javascript pulling the files right from the resources..

Visual viewport vs Layout viewport on mobile devices

http://stackoverflow.com/questions/7344886/visual-viewport-vs-layout-viewport-on-mobile-devices

content that's explicitly wider than the layout viewport the visual viewport is stretching to fit all of that in Shouldn't there be a scrollbar No because you're only indicating to the browser what the initial dimensions of the layout viewport..

NSData and Uploading Images via POST in iOS

http://stackoverflow.com/questions/8042360/nsdata-and-uploading-images-via-post-in-ios

data taken from my iPhone Simulator Photo Library. The data once on the server is just a huge string of hexidecimal. Shouldn't NSData just be a byte stream I don't get whats going on with all the hex or why this code seems to work for everyone else...