iphone

UITextView selectedRange not displaying when set programatically

My problem is that programatically setting the selectedRange of UITextView selects the text, but does not visually indicate it's selected. Does this sound like a bug in OS 3.0/3.1. More importantly, any solution or suggestions for getting the selection to display? (sample project linked at bottom of message) How do I know it's selected ...

Variable height UILabel

I'm working on a iPhone product page where some of the fields can be fairly long (product name etc.) I've created the page layout in IB, and use UILabels to show the text fields. For those long text labels I'd like the height of the label to scale and push the other labels further down. Is this possible using IB, or would I have to do ev...

Can tabbar appear only on first view?

Would I violate the HIG by showing a tab bar on my first view only? The first view also has a tableview and navigation bar at the top. Once the user selects a row, it goes to another tableview and no tab bar. The navigation bar is still at the top and the user can go back. Clicking a row from here displays the detail view. In summary...

Any hack to get cell id on iPhone 3.0 ?

There was a hack for previous firmware using a reverse engineering of Code Telephony but it does not work anymore. ...

iPhone UILabel text soft shadow

I know soft shadows are not supported by the UILabel our of the box, on the iPhone. So what would be the best way to implement my own one? EDIT: Obviously I will subclass the UILabel and draw in the -drawRect: My question is, how do I get the contents of the label as graphics and draw around them, blur them etc... ...

Different alpha for subviews in the same container

I have a question similar to the http://stackoverflow.com/questions/1269637/can-you-override-a-parent-uiviews-alpha-value-on-one-of-its-subviews In some cases I want to show custom semi-transparent full-screen overlay view over current view. The trick is that I want it to have custom navigation bar at the top and some other contents (le...

Custom Wrapper Class for UIDatePickerView on iPhone

Hi I'll be using a datePicker several places in my app. I don't want to "clutter" up each and every viewController with the delegation methods for the UIPickerViewDelegate and UIPickerDatasource, plus I would be doing the same delegation methods over and over again. Every time the datePicker is in play it's sole purpose is to slide half...

iPhone UITableView populated by checked Table Cells. How?

I came upon this blog post the other day and literally have no idea how to implement it, logically. Any ideas? I was thinking it involves core data, with 'power' being another entity in a to-many relationship, besides that, I'm lost. ...

How To Pass a Dictionary To a Function

Alright, so I think I'm doing this the right way. I'm new to objective-C, so I'm not sure about the syntax... I have a set of code that I need to call multiple times, from different files. So I made a new class that has a method in it that I'll call and pass it the values that it needs. Because I am passing different values I've put ...

Conditional Compilation in assembler (.s) code for iPhone - how?

I have a few lines of assembler arm code in an .s file. Just a few routines i need to call. It works fine when building for the device, however when i switch to iPhone Simulator i get "no such instruction" errors. I tried to compile parts of the .s file conditionally with what i know: #if !TARGET_IPHONE_SIMULATOR But the assembler do...

Add contact to addressbook in iphone objective-c

What is the correct way to set street address etc in addressbook and let the user save it on iphone? EDIT: removed the specific code-problem and made it more general ...

iPhone adhoc distribution without entitlements

I'm trying to make an ad-hoc distribution of our app for sending to another company for beta testing. They are asking me to remove the Entitlements.plist file from my project. As far as I know that file is absolutely required and I get a code signing error if it's not there. Is there a way to build an iPhone app for distribution withou...

Playing generated audio on an iPhone

As a throwaway project for the iPhone to get me up to speed with Objective C and the iPhone libraries, I've been trying to create an app that will play different kinds of random noise. I've been constructing the noise as an array of floats normalized from [-1,1]. Where I'm stuck is in playing that generated data. It seems like this sho...

Disable system popups or otherwise prevent the override of idletime disabled

I have a clock program that needs to stay alive all night. I use the idletimer disabled function, but getting a text, missed call, or other notification overrides the idletimer setting back to enabled and allows the phone to sleep. I am thinking that I either need to disable the popups somehow while my app is running, or do something els...

Promo code for in app purchase items

Apple doesn't provide promo codes for in app purchase products. My content will be in an sqlite database in the app. I'll use a column flag to indicate purchase status. Once the user purchases, I unlock the row by changing the flag. Would it be easy enough to provide another interface so the user can enter in a code and unlock the it...

Change System Font for iPhone application - entire Application

Is there a way I can change the System FOnt for teh entire application? I want to have it define for the entire APplication so that I dont have to go to individual label or individual fotn and change it.... I wnat a universal definition whcih will change all the fonts that exist within the applicaion ...

iPhone table view - some button/action questions

I created a table view that is populated with a custom UITableViewCell (like this). Each of the cells contains two UIButtons. I assign the action to the button like this: [decreaseButton addTarget:self action:@selector(decrease) forControlEvents:UIControlEventTouchUpInside]; Is this the right way? Anyway, it works, but in my "decreas...

Primary Key behaviour in Core Data iPhone

I am making an app that parses feeds from xml and stores them using Core Data. The issue I am dealing with at the moment is duplicate entries. Every feed I am parsing contains a unique id, something that I get in my model as an int. Now what I need is to tell Core Data not to store that entity if another with the same id already exists. ...

CATiledLayer blanking tiles before drawing contents

All, I'm having trouble getting behavior that I want from CATiledLayer. Is there a way that I can trigger the tiles to redraw without having the side-effect that their areas are cleared to white first? I've already subclassed CATiledLayer to set fadeDuration to return 0. To be more specific, here are the details of what I'm seeing an...

UIScrollView Infinite Scroll?

Does anyone have any idea how I can go about creating an infinite scroll. A good example of this is in the 4 Track iPhone app. There are scrollable "wheels" above the track numbers and below the time indicator. I'm assuming it's using UIScrollView and then drawing the subview as they are scrolled into to view. Any tips? ...