¡@

Home 

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

iphone Programming Glossary: sometimes

Tricks for improving iPhone UITableView scrolling performance?

http://stackoverflow.com/questions/1352479/tricks-for-improving-iphone-uitableview-scrolling-performance

the cell heights vary depending on the size of the image. Scrolling performance is decent but can sometimes be jerky. I found these tips I found on the FieryRobot blog glassy scrolling with uitableview more glassy..

Cropping a UIImage

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

could use a UIImageView and adjust the crop mode to achieve the same results but these images are sometimes displayed in UIWebViews . I've started to notice some crashes in this code and I'm a bit stumped. I've..

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

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 them have the idea about the size though A solution.. hardcoded size inside the controller would not work at all my controllers have to be sometimes big sometimes small controller that will present them have the idea about the size though A solution for all that..

iPhone - Backgrounding to poll for events

http://stackoverflow.com/questions/4656214/iphone-backgrounding-to-poll-for-events

even use VoIP Sockets. But this 10 Minutes callback provides a nice side effect After 10 Minutes sometimes earlier I discovered that my timers and previous running treads are being executed for a short while... code like threads are being executed for nearly 30 seconds. This is useful code if you must sometimes check something. The doc says that all background tasks VoIP audio location updates will be automatically..

iOS 5 Best Practice (Release/retain?)

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

However certain things wont work and most noticeably many libraries you might wish to use will sometimes throw up innumerable errors and you will be unable to use them until the developers release an update..

Understanding reference counting with Cocoa and Objective-C

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

the object any other piece of code also referencing the object will be unaffected. What can sometimes be confusing is knowing the circumstances under which you should call retain and release . My general.. Ref count is 0 object is freed Now for autorelease . Autorelease is used as a convenient and sometimes necessary way to tell the system to free this object up after a little while. From a plumbing perspective..

Re-sign IPA (iPhone)

http://stackoverflow.com/questions/6896029/re-sign-ipa-iphone

like to re sign with a enterprise account instead of the corporate account for the app store or sometimes ad hoc distributed . My problem is that when I try to resign the app it won't install on my device and..

Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error

http://stackoverflow.com/questions/6984368/undefined-symbols-for-architecture-i386-objc-class-skpsmtpmessage-refere

Compile Sources step of the Build Phases tab of your target. Normally Xcode does this for you but sometimes it loses the plot and you need to add the .m file manually. To do this TargetSettings Build Phases Compile..

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

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 and you intermix ARC and non ARC code..

Tricks for improving iPhone UITableView scrolling performance?

http://stackoverflow.com/questions/1352479/tricks-for-improving-iphone-uitableview-scrolling-performance

uitableview that loads fairly large images in each cell and the cell heights vary depending on the size of the image. Scrolling performance is decent but can sometimes be jerky. I found these tips I found on the FieryRobot blog glassy scrolling with uitableview more glassy scrolling with uitableview Does anyone have any tips for..

Cropping a UIImage

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

to what's seen in the album view of the Photos app. I know I could use a UIImageView and adjust the crop mode to achieve the same results but these images are sometimes displayed in UIWebViews . I've started to notice some crashes in this code and I'm a bit stumped. I've got two different theories and I'm wondering if either is..

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

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 them have the idea about the size though A solution for all that pain is as follows You have to reset the size.. 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 them have the idea about the size though A solution for all that pain is as follows You have to reset the size of currentSetSizeForPopover..

iPhone - Backgrounding to poll for events

http://stackoverflow.com/questions/4656214/iphone-backgrounding-to-poll-for-events

@ VOIP backgrounding accepted Now the magic happens I don't even use VoIP Sockets. But this 10 Minutes callback provides a nice side effect After 10 Minutes sometimes earlier I discovered that my timers and previous running treads are being executed for a short while. You can see this if you place some NSLog .. into your code... we have 30 seconds execution time left. I assume that background code like threads are being executed for nearly 30 seconds. This is useful code if you must sometimes check something. The doc says that all background tasks VoIP audio location updates will be automatically restarted in background if the app was terminated. VoIP..

iOS 5 Best Practice (Release/retain?)

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

ARC enabled apps to run on iOS 4 no modifications required. However certain things wont work and most noticeably many libraries you might wish to use will sometimes throw up innumerable errors and you will be unable to use them until the developers release an update which is compatible with ARC. Edit I recently discovered that..

Understanding reference counting with Cocoa and Objective-C

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

to the rules when one piece of code retains and then releases the object any other piece of code also referencing the object will be unaffected. What can sometimes be confusing is knowing the circumstances under which you should call retain and release . My general rule of thumb is that if I want to hang on to an object for.. do this after init s release Ref count is back to 1 s release Ref count is 0 object is freed Now for autorelease . Autorelease is used as a convenient and sometimes necessary way to tell the system to free this object up after a little while. From a plumbing perspective when autorelease is called the current thread's NSAutoreleasePool..

Re-sign IPA (iPhone)

http://stackoverflow.com/questions/6896029/re-sign-ipa-iphone

a couple of IPA files from different people that I would like to re sign with a enterprise account instead of the corporate account for the app store or sometimes ad hoc distributed . My problem is that when I try to resign the app it won't install on my device and it should since it's a Enterprise build . The error message..

Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error

http://stackoverflow.com/questions/6984368/undefined-symbols-for-architecture-i386-objc-class-skpsmtpmessage-refere

type of error if your class' .m file is not listed under the Compile Sources step of the Build Phases tab of your target. Normally Xcode does this for you but sometimes it loses the plot and you need to add the .m file manually. To do this TargetSettings Build Phases Compile Sources add your .m class Build and Run share improve..

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

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 and you intermix ARC and non ARC code you will have memory problems. ARC uses KVC naming to make..

Tricks for improving iPhone UITableView scrolling performance?

http://stackoverflow.com/questions/1352479/tricks-for-improving-iphone-uitableview-scrolling-performance

in each cell and the cell heights vary depending on the size of the image. Scrolling performance is decent but can sometimes be jerky. I found these tips I found on the FieryRobot blog glassy scrolling with uitableview more glassy scrolling with..

iphone: Calculating battery life

http://stackoverflow.com/questions/1469549/iphone-calculating-battery-life

I've tried comparing some existing battery apps battery left Apple's figures and I dont come up with the same answers sometimes. Also there are stats for using 2G cell as opposed to 3G and I dont see anything on Apple for 2G battery life. Of course..

Dragging an UIView inside UIScrollView

http://stackoverflow.com/questions/1481826/dragging-an-uiview-inside-uiscrollview

CGPoint location touch locationInView self.superview self.center location This works but not fully correct the tile sometimes falls down during the drag process. More precisely it stops receiving touchesMoved invocations and scroll view starts scrolling..

Cropping a UIImage

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

Photos app. I know I could use a UIImageView and adjust the crop mode to achieve the same results but these images are sometimes displayed in UIWebViews . I've started to notice some crashes in this code and I'm a bit stumped. I've got two different..

Break on EXC_BAD_ACCESS in XCode?

http://stackoverflow.com/questions/1622079/break-on-exc-bad-access-in-xcode

you can usually backtrack to see what the issue was. It especially helps in background threads when the Debugger sometimes craps out on any useful information. VERY IMPORTANT TO NOTE however is that you need to 100 make sure this is only in your..

Finding the direction of scrolling in a UIScrollView?

http://stackoverflow.com/questions/2543670/finding-the-direction-of-scrolling-in-a-uiscrollview

self .x NSLog @ f f before now if now before right NO NSLog @ LEFT else right YES NSLog @ RIGHT But this method sometimes doesn't get called at all when I move. What do you think iphone ios cocoa touch uiscrollview share improve this question..

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

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 them have the idea about the size though A solution for all that pain is.. 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 them have the idea about the size though A solution for all that pain is as follows You..

How many times do I release an allocated or retained object?

http://stackoverflow.com/questions/3730804/how-many-times-do-i-release-an-allocated-or-retained-object

that have been allocated or retained. In the dealloc function I am releasing all such objects but then I realized that sometimes I end up releasing objects when they have not been allocated yet. So I figured I need to check if its retainCount is greater..

iPhone - Backgrounding to poll for events

http://stackoverflow.com/questions/4656214/iphone-backgrounding-to-poll-for-events

magic happens I don't even use VoIP Sockets. But this 10 Minutes callback provides a nice side effect After 10 Minutes sometimes earlier I discovered that my timers and previous running treads are being executed for a short while. You can see this if.. I assume that background code like threads are being executed for nearly 30 seconds. This is useful code if you must sometimes check something. The doc says that all background tasks VoIP audio location updates will be automatically restarted in background..

Invoke native date picker from web-app on iOS/Android

http://stackoverflow.com/questions/4946919/invoke-native-date-picker-from-web-app-on-ios-android

Context currentCtx ctx.getContext and in the JavaScript file replace PhoneGap with cordova . Also note that GitHub sometimes renders README.md wrong see its raw version . The iOS plugin is already updated for Cordova. Even when input type date is..

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

which has been presented. Update If you layout out UIs with the appropriate autoresizing masks on the various bits sometimes you don't even need to deal with the 'manual' laying out of your UI it just gets dealt with... share improve this answer..

Am I abusing UIViewController Subclassing?

http://stackoverflow.com/questions/5691226/am-i-abusing-uiviewcontroller-subclassing

UITabBarController. None of that is useful to objects that aren't managing the entire screenful of content. It happens sometimes that a group of views will replicated on several screens and in some of those cases it's helpful to manage those views with..

iOS 5 Best Practice (Release/retain?)

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

modifications required. However certain things wont work and most noticeably many libraries you might wish to use will sometimes throw up innumerable errors and you will be unable to use them until the developers release an update which is compatible..

Understanding reference counting with Cocoa and Objective-C

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

retains and then releases the object any other piece of code also referencing the object will be unaffected. What can sometimes be confusing is knowing the circumstances under which you should call retain and release . My general rule of thumb is that.. is back to 1 s release Ref count is 0 object is freed Now for autorelease . Autorelease is used as a convenient and sometimes necessary way to tell the system to free this object up after a little while. From a plumbing perspective when autorelease..

Re-sign IPA (iPhone)

http://stackoverflow.com/questions/6896029/re-sign-ipa-iphone

people that I would like to re sign with a enterprise account instead of the corporate account for the app store or sometimes ad hoc distributed . My problem is that when I try to resign the app it won't install on my device and it should since it's..

Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error

http://stackoverflow.com/questions/6984368/undefined-symbols-for-architecture-i386-objc-class-skpsmtpmessage-refere

not listed under the Compile Sources step of the Build Phases tab of your target. Normally Xcode does this for you but sometimes it loses the plot and you need to add the .m file manually. To do this TargetSettings Build Phases Compile Sources add your..

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

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 and you intermix ARC and non ARC code you will have memory..

Images for iphone 5 retina display

http://stackoverflow.com/questions/12532405/images-for-iphone-5-retina-display

device. Unfortunately imageNamed will NOT automatically load 568h@2x versions of images when running on an iPhone 5. Sometimes this doesn't matter for example icons and non full screen graphics are probably the same on iPhone 4 5. However if you have..

Undo auto resizing for iPhone 5 screen after adding Default-568h@2x.png

http://stackoverflow.com/questions/12536486/undo-auto-resizing-for-iphone-5-screen-after-adding-default-568h2x-png

Ignore certain exceptions when using Xcode's All Exceptions breakpoint

http://stackoverflow.com/questions/14370632/ignore-certain-exceptions-when-using-xcodes-all-exceptions-breakpoint

exceptions when using Xcode's All Exceptions breakpoint I have an All Exceptions breakpoint configured in Xcode Sometimes Xcode will stop on a line like managedObjectContext save error with the following backtrace but the program continues on..

Why am I crashing after MKMapView is freed if I'm no longer using it?

http://stackoverflow.com/questions/2188098/why-am-i-crashing-after-mkmapview-is-freed-if-im-no-longer-using-it

am I crashing after MKMapView is freed if I'm no longer using it I have a MKMapView . Sometimes after my view controller is dismissed I'll get a EXC_BAD_ACCESS . I turned on NSSZombies and it looks like the MKMapView..

When is an autoreleased object actually released?

http://stackoverflow.com/questions/2498330/when-is-an-autoreleased-object-actually-released

messages. One last note. There can be more than one autorelease pool that aren't always at the end of the event loop. Sometimes you might allocate tens of thousands of objects in one trip thorough the event loop. When that happens you might setup additional..

Is there an iphone url scheme to start a web app in standalone mode from a link

http://stackoverflow.com/questions/3707974/is-there-an-iphone-url-scheme-to-start-a-web-app-in-standalone-mode-from-a-link

I'm trying to do is this I've got a web app the user can choose to add to the homescreen and run in standalone mode. Sometimes the server side of the app sends SMS'es to the user to notify the user of significant events. The SMS contains an URI to..

Editing a UITextField inside a UITableViewCell fails

http://stackoverflow.com/questions/376372/editing-a-uitextfield-inside-a-uitableviewcell-fails

i.e. its editing property needs to be set to YES . The good news is that you are now able to move the insertion point. Sometimes the magnifying glass doesn't appear or follow but your gesture always seems to work. Does this still qualify as a bug Perhaps...

How should I architect my iPhone app to talk to my website?

http://stackoverflow.com/questions/3943597/how-should-i-architect-my-iphone-app-to-talk-to-my-website

synchronous connections not even from a dedicated thread. Asynchronous connections with delegate is the way to go. Sometimes multiple requests need to be made to get all required data. You might want to create some kind of state machine to keep..

Back button don't appear in navigationController

http://stackoverflow.com/questions/4281063/back-button-dont-appear-in-navigationcontroller

How to steal touches from UIScrollView?

http://stackoverflow.com/questions/4629499/how-to-steal-touches-from-uiscrollview

from someone that can answer it . Thanks iphone ios4 uiscrollview nested uipickerview share improve this question Sometimes you have to ask the question before you can find the answer. Dan Ray had a similar problem and solved it with a very different..

iPhone - Backgrounding to poll for events

http://stackoverflow.com/questions/4656214/iphone-backgrounding-to-poll-for-events

from the long running task. Just try it out. Use your Console to see what happens... Have Fun Update 2 Sometimes simplifying things helps. My new approach is this one void applicationDidEnterBackground UIApplication application UIApplication..

unrecognized selector sent to instance

http://stackoverflow.com/questions/5637203/unrecognized-selector-sent-to-instance

the following error message which I cannot understand why its happening because I am not using any UIImageView. Sometimes I get the same error but its a CALayer Its worth also mentioning that I have 2 nibs and 2 controllers and a base controller..

Strange behavior of select/dropdown's onchange() JS event when using 'Next' on Mobile Safari Dropdown list item select box

http://stackoverflow.com/questions/5960731/strange-behavior-of-select-dropdowns-onchange-js-event-when-using-next-on-m

button. This causes two problems First On this action the first dropdown's oncange event is not triggered reliably Sometimes it fires sometimes not. If after selecting an Area the user touches somewhere else on the webpage or presses the Done button..

Making a phone call in an iOS application

http://stackoverflow.com/questions/6323171/making-a-phone-call-in-an-ios-application

NSString stringWithFormat @ tel @ phone NSLog @ making call with @ theCall myApp openURL NSURL URLWithString theCall Sometimes the variable phone is something such as @ 102 222 2222 . How can I make a call with a phone number like this Do I need to..

objective C track all method calls?

http://stackoverflow.com/questions/7223555/objective-c-track-all-method-calls

C track all method calls Sometimes when looking at someone else's large objective C program it is hard to know where to begin. In such situations I think it..

UIWebview and IPhone content does not postback (ASP.NET Browser Capability issues)

http://stackoverflow.com/questions/7275695/uiwebview-and-iphone-content-does-not-postback-asp-net-browser-capability-issue

indicator is shown and I've hooked a debugger to the site that catches all serverside events and it is never hit. Sometimes about once every 2 hours the postback DOES work on the iphone but extremely rarely and intermittently. Dd1 is a date dropdown..

What does 8badf00d mean?

http://stackoverflow.com/questions/773442/what-does-8badf00d-mean

does 8badf00d mean Sometimes my iPhone application crashes with a weird crashlog that reads exception code is 0x8badf00d. The stacktraces show random..

alternatives to XCode for iPhone development? (OR: how to make XCode suck less?) [closed]

http://stackoverflow.com/questions/803366/alternatives-to-xcode-for-iphone-development-or-how-to-make-xcode-suck-less

Trouble running Instruments on iPad

http://stackoverflow.com/questions/8152739/trouble-running-instruments-on-ipad

but then states that it's Finished running immediately. The app isn't run and in most cases there's no error message. Sometimes just sometimes there's a message from the Organiser stating that device does not recognise host E800001C. 5 Running the..

Lua on iPhone?

http://stackoverflow.com/questions/937136/lua-on-iphone

builder build_for_iphoneos . If it's not autoconf then you can use that script to get an idea of how to attack it. Sometimes you can just build a Static Library Xcode project dump all the files into it and hit build. If the build is simple enough..