Search Results

Search found 8409 results on 337 pages for 'itunes sdk'.

Page 163/337 | < Previous Page | 159 160 161 162 163 164 165 166 167 168 169 170  | Next Page >

  • how to send a POST value to a server with a PHP script waiting for it from iPhone app

    - by Sam Jarman
    Hi In my iPhone app - I am trying to get what the user types in a box emailed to me. I am going to use a PHP script sitting on my server, and try send the data to it for it to be processed. Promblem is... how do i do this? Im using the ASIHTTPRequest wrapper and have some code like this ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease]; [request setPostValue:@"[email protected]" forKey:@"address"]; [request setPostValue:@"mymessagehere" forKey:@"message"]; and have this simple php script which i plan to use here http://www.w3schools.com/PHP/php_mail.asp How do I go about joining these up? Any tutorial links/blog post/ideas appreciated

    Read the article

  • Changing Tint / Background color of UITabBar

    - by pixel
    The UINavigationBar and UISearchBar both have a tintColor property that allows you to change the tint color (surprising, I know) of both of those items. I want to do the same thing to the UITabBar in my application, but have found now way to change it from the default black color. Any ideas?

    Read the article

  • How would I add code that would update an online "counter" so I know how many times an iPhone app is

    - by Luis Tovar
    So I have searched for this but not finding anything about it and if I missed it sorry about that. What I am trying to do is see how to go about adding some code to my iphone app that will connect to a php script (if connection available) and update a counter so that I can let my clients know that their app is constantly being used? Also, would apple allow that? Or would my app be denied for doing such a thing? Any help would be great! Thanks in advance.

    Read the article

  • File observer problem

    - by Nemat
    Hi, I want to listen to the changes occured in file system.I am using FileObserver.Here is my code: Code: class MyDirObserver extends FileObserver { String superPath; public MyDirObserver(String path) { super(path, ALL_EVENTS); this.superPath=path; } public void onEvent(int event, String path) { Log.e("onEvent of Directory", "=== onEvent ==="); try{ _Dump("dir", event, path,superPath); } catch(NullPointerException ex) { Log.e("ERROR","I am getting error"); } } } private void _Dump(final String tag, int event, String path,String superPath) { Log.d(tag, "=== dump begin ==="); Log.d(tag, "path=" + path); Log.d(tag,"super path="+superPath); Log.d(tag, "event list:"); if ((event & FileObserver.OPEN) != 0) { Log.d(tag, " OPEN"); } if ((event & FileObserver.CLOSE_NOWRITE) != 0) { Log.d(tag, " CLOSE_NOWRITE"); } if ((event & FileObserver.CLOSE_WRITE) != 0) { Log.d(tag, " CLOSE_WRITE"); Log.i("NEWFILEOBSERVER","File is Modified"); if(path!=null) { Log.d("---------FilePath",superPath+path); } } if ((event & FileObserver.CREATE) != 0) { isCreate=true; Log.i("NEWFILEOBSERVER","File is Created "); if(path!=null) { Log.d("---------FilePath",superPath+path); } Log.d(tag, " CREATE"); } if ((event & FileObserver.DELETE) != 0) { Log.i("NEWFILEOBSERVER","File is deleted"); if(path!=null) { Log.d("---------FilePath",superPath+path); } // startMyActivity("A new file is deleted thats="+superPath); Log.d(tag, " DELETE"); } if ((event & FileObserver.DELETE_SELF) != 0) { Log.d(tag, " DELETE_SELF"); } if ((event & FileObserver.ACCESS) != 0) { Log.d(tag, " ACCESS"); } if ((event & FileObserver.MODIFY) != 0) { if(!isModified) isModified=true; if(isModified && isOpen) isAgainModified=true; Log.d(tag, " MODIFY"); } if ((event & FileObserver.MOVED_FROM) != 0) { Log.d(tag, " MOVED_FROM"); if(path!=null) { Log.d("---------FilePath",superPath+path); } } if ((event & FileObserver.MOVED_TO) != 0) { Log.d(tag, " MOVED_TO"); if(path!=null) { Log.d("---------FilePath",superPath+path); } } if ((event & FileObserver.MOVE_SELF) != 0) { Log.d(tag, " MOVE_SELF"); } if ((event & FileObserver.ATTRIB) != 0) { Log.d(tag, " ATTRIB"); } Log.d(tag, "=== dump end ==="); } it stops after some time.I dont get the exact time but doesnt work always though I call startWatching() in service in a loop which runs for all the folders of sdcard and calls startWatching() for each of them. It shows unpredictable behaviour and stops listening for some folders and runs perfectly for the others. I hope you guys help me.I tried many ways but it doesnt work perfectly.Am I doing something wrong??? or there we have some other way to do this....... Please help me........I have to get this done withing few days...... Any help is appreciated!!!! Thanks in Advance Nemat

    Read the article

  • Create custom component based on LinearLayout, declaring layout in XML

    - by pheelicks
    I've been trying to create a Compound Control in Android 1.5 (as described here) but havn't been able to find any good examples on how to do this using an XML file to specify a layout. I'm fine with creating an Activity and then loading an xml file using the following in the constructor: setContentView(R.layout.main); However, I want to do this in subclass of LinearLayout - so I can use this compound component in other XML layouts. Something along the lines of: public class CustomView extends LinearLayout { public CustomView(Context context) { super(context); setupView(); } public CustomView(Context context, AttributeSet attrs) { super(context, attrs); setupView(); } public void setupView() { setContentView(R.layout.custom); // Not possible } } What is the correct way of going about doing this?

    Read the article

  • CGContextShowTextAtPoint: invalid context

    - by coure06
    I want to call a method responsible for drawing text on screen after each 5 seconds. Here is my code -(void) handleTimer: (NSTimer *)timer { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); CGContextSetStrokeColorWithColor(context, currentColor.CGColor); CGContextTranslateCTM(context, 145.0, 240.0); CGContextScaleCTM(context, 1.0, -1.0); CGContextSelectFont(context, "Arial", 18, kCGEncodingMacRoman); CGContextSetCharacterSpacing(context, 1); CGContextSetTextDrawingMode(context, kCGTextFillStroke); CGContextSetRGBStrokeColor(context, 0.5,0.5,1,1); CGContextShowTextAtPoint(context, 100, 100, "01", 2); } But after 5 seconds when this method is called i am getting this error CGContextShowTextAtPoint: invalid context Another thing is how to show a thinner font?

    Read the article

  • Create an UIButton with "push button" appearance?

    - by Krumelur
    I want to create a button with the same look and feel as the "Timer" function in the builtin Clock app, but it really eludes me how to do it. By looking at the source code for UICatalog, it seems to create these buttons you need to create a custom bitmap. Is this true? If so, is there a "standard" bitmap that can be used, to ensure consistent user experience?

    Read the article

  • build version - iphone app (xcode)

    - by peter61
    For one of my applications in xcode, I have the option to build for many different versions ranging from 3.0 to 3.1.3. Now when I make a new application, I only have the option to build this new application for 3.1.3. I can't seem to find where this project setting is. How can I build my application for 3.0? Thanks.

    Read the article

  • Rotating UIWebView with transform, content partially off screen, how to get it to stick on screen?

    - by jarmod
    I have a 320x416 portrait-shaped UIWebView filling a UIViewController's view. I also have a 90 degree rotate button that will transform the UIWebView through 90 degrees each time the button is touched. The code is basically: webView.transform = CGAffineTransformMakeRotation(touches%4 * M_PI/2.0); After rotation through 90 degrees, the now-landscape transformed UIWebView extends beyond both the left and right edges of the screen. In the process of applying the transformation, iPhone OS has changed the UIWebView's frame from {{0,0}, {320,416}} to {{-48,48}, {416,320}}. Don't have a problem with that. I then tweak the UIWebView's frame origin to (0,0) so that it starts top-left, but extends a little further beyond the right edge of the screen. Now, I can touch the UIWebView and pull it left to view the hidden information on the right but I cannot get the right-hand end to to stay on the screen -- the moment I untouch it, the right side bounces back off the screen. What is it that causes the view to bounce back off-screen? In other words, what is it that I need to tweak to allow either the left edge or the right edge to stick on the screen and remain visible (only one at a time, obviously)? Thanks.

    Read the article

  • Core Data: fetch an NSManagedObject by its properties

    - by niklassaers
    Hi guys, I have an object NetworkMember that has no attributes but is defined by its relationships Person, Network, Level and Role. In my app, I've found all the four relationships, but I want to make sure not to double-register my NetworkMember, thus I'd like to search for this NSManagedObject before instantiating it. How should I write a query that queries for an NSManagedObject just consisting of relationships? Cheers Nik

    Read the article

  • Performing selectors on main thread with NSInvocation

    - by kpower
    I want to perform animation on main thread (cause UIKit objects are not thread-safe), but prepare it in some separate thread. I have (baAnimation - is CABasicAnimation allocated & inited before): SEL animationSelector = @selector(addAnimation:forKey:); NSString *keyString = @"someViewAnimation"; NSInvocation *inv = [NSInvocation invocationWithMethodSignature:[workView.layer methodSignatureForSelector:animationSelector]]; [inv setTarget:workView.layer]; [inv setSelector:animationSelector]; [inv setArgument:baAnimation atIndex:2]; [inv setArgument:keyString atIndex:3]; [inv performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:NO]; I get: *** +[NSCFString length]: unrecognized selector sent to class 0x1fb36a0 Calls: > #0 0x020984e6 in objc_exception_throw > #1 0x01f7e8fb in +[NSObject doesNotRecognizeSelector:] > #2 0x01f15676 in ___forwarding___ > #3 0x01ef16c2 in __forwarding_prep_0___ > #4 0x01bb3c21 in -[CALayer addAnimation:forKey:] > #5 0x01ef172d in __invoking___ > #6 0x01ef1618 in -[NSInvocation invoke] But [workView.layer addAnimation:baAnimation forKey:@"someViewAnimation"]; works fine. What am I doing wrong?

    Read the article

  • How to load a NIB inside of a view in another NIB?

    - by Sheehan Alam
    I have two NIB's ParentViewController.xib ChildViewController.xib ParentViewController.xib contains a UIView and a UIViewController. ChildViewController.xib contains a UIButton I want ChildViewController.xib to load in the ParentViewController.xib's UIView I have done the following: Created @property for UIView in ParentViewController Connected File's Owner to UIView in ParentViewController Set UIViewController in ParentViewController's NIB Name property to ChildViewController in Interface Builder Set ChildViewController view property to UIView in ParentViewController I was hoping this would load ChildViewController into my UIView in ParentViewController but no luck. I did get the following warning, which could be the culprit: 'View Controller (Child View)' has both its 'NIB Name' property set and its 'view' outlet connected. This configuration is not supported. I also have added additional code in ParentViewController's viewDidLoad(): - (void)viewDidLoad { [super viewDidLoad]; ChildViewController *childViewController = [[ChildViewController alloc]initWithNibName:@"ChildViewController" bundle:nil]; childViewController.view = self.myView; } Any thoughts on why ChildViewController does not load in the UIView of ParentViewController?

    Read the article

  • Rotation of ViewController in TabbarController

    - by hanno
    I have a custom UIViewController in a UITabbarController and want to respond to rotation events. When a rotation occurs, the tabbarcontroller and the viewcontroller get rotated. However, the view in the viewcontroller doesn't get redrawn properly: the layout doesn't autoresize and it is black on parts of the screen. The strange thing is that it works when I go to another tab and the back again to my original viewcontroller. What could possibly be wrong? I checked that didRotateFromInterfaceOrientation:fromInterfaceOrientation is being called. However, the view.frame.size values are still the old ones from before the rotation. That's probably not correct.

    Read the article

  • fill UIWebVIew TextInput with custom keyboard

    - by user319097
    For an app I am working on I want a custom keyboard to come up when you tap on an input field in a UIWebview, for example for UITextView i use this code : myText.text = [myText.text stringByAppendingString:@"a"]; but i don't know how can i fill a text field in UIWebVIew Any help would be very much appreciated; thanks!

    Read the article

  • Running activity from remote service

    - by Moshik
    Hi, iam trying to run an activity from diffrent package from my remote service: this is how i implement the service.java ublic class CurrencyService extends Service { public class CurrencyServiceImpl extends ICurrencyService.Stub { int CALL_PUSH_SERVICE_ACTIVITY=10; @Override public void callSomeActivity(int activityId) throws RemoteException { Intent pushActivity=new Intent("com.pushservice.PushActivity"); pushActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(pushActivity); .. ive also added a line in the manifest of the service: the service works fine, but i cant run the activity - PushActivity which is in diffrent package of diffrent application, thanks.

    Read the article

  • Switch between speakerphone and headset on Android

    - by user210504
    Hi! I wish to know if there is a way, using which we can switch between the speaker and headset dynamically in an android application. I am using this sample code, I found online for my experiments final float frequency = 440; float increment = (float)(2*Math.PI) * frequency / 44100; // angular increment for each sample float angle = 0; AndroidAudioDevice device = new AndroidAudioDevice( ); AudioManager am = (AudioManager)getSystemService(AUDIO_SERVICE); am.setMode(AudioManager.MODE_IN_CALL); float samples[] = new float[1024]; int count = 0; while( count < 10 ) { count++; for( int i = 0; i < samples.length; i++ ) { samples[i] = (float)Math.sin( angle ) ; angle += increment; } device.writeSamples( samples ); } device.stop(); am.setMode(AudioManager.MODE_NORMAL); ---- next class public class AndroidAudioDevice { AudioTrack track; short[] buffer = new short[1024]; public AndroidAudioDevice( ) { int minSize =AudioTrack.getMinBufferSize( 44100, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT ); track = new AudioTrack( AudioManager.STREAM_VOICE_CALL, 44100, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, minSize, AudioTrack.MODE_STREAM); track.play(); } public void writeSamples(float[] samples) { fillBuffer( samples ); track.write( buffer, 0, samples.length ); } private void fillBuffer( float[] samples ) { if( buffer.length < samples.length ) buffer = new short[samples.length]; for( int i = 0; i < samples.length; i++ ) buffer[i] = (short)(samples[i] * Short.MAX_VALUE);; } public void stop() { track.stop(); } } As per my understanding this should play audio on headset, because we have not enabled the speaker phone. However, the audio is playing on the speaker phone. 1 Am I doing something wrong here? 2 What would be a way to switch between internal speaker and speaker phone dynamically for same code peice Any help will be appreciated.

    Read the article

  • Android Force Recycle Large Bitmap?

    - by GuyNoir
    From another stackoverflow question, it seems that Android handles large bitmaps differently than other memory. It also seems like there is a way to force Android to recycle the bitmaps to free up memory. Can anyone enlighten me on how to do this. My application uses 2-6 huge bitmaps at all times, so it nearly kills the phone's memory when running, and I want to clear it up when the user quits.

    Read the article

  • Can the memory used by MKMapView be released some how?

    - by gdr
    I am using an MKMapView in my iPhone application. When I load this view, the activity monitor instrument shows that the real memory of my App is increasing significantly. It keeps going up as you move the map around or zoom in and out. Once the View controller that loads this view is removed, the memory that was allocated due to the usage of the mapView does not get freed up. Is there something that can be done to get all this memory back?

    Read the article

  • iPhone: App crashes when I click on a cell in table view.

    - by Jack Griffiths
    Hi there, Compiling my application works—everything is fine. The only errors I get are by deprecated functions (setText). The only problem is now, is that when I tap on a cell in my table, the app crashes, even though it's meant to push to the next view in the stack. Any solutions are appreciated, if you need any code, just ask. Also, how can I only make sure that one cell goes to only one view? For example: When I tap on CSS, it takes me to a new table with different levels of CSS. WHen I tap on an item in that new view, it comes up with an article on what I just selected. Regards, Jack

    Read the article

  • Sort NSFetchedResultsController results by user location

    - by cgp
    I have an application that contains some Locations in Core Data, and I want to show them to the user in order of proximity to the user's location. I am using an NSFetchedResultsController to serve the locations to the Table View. I thought about creating a virtual accessor method that returns the location's distance from the user, that would be calculated using a "global" CoreLocationManager, but it crashes with reason: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'keypath distanceFromCurrentLocation not found in entity < NSSQLEntity Location id=4' I also give the user the option to sort alphabetically, so I would prefer it if I kept the NSFetchedResultsController, if possible. How should I do it? Thanks!

    Read the article

  • How to call a method of a specific class from another class (created in this specific class) ?

    - by choise
    I created a TTModelViewController. in the createModel Method i created a TTURLRequestModel. after Loading content in the TTURLRequestModel i want to call a method in my TTModelViewController. TTModelViewController - (void) createModel { requestModel = [[singlePostModel alloc] initWithId:@"54"]; } - (void)didLoadModel:(BOOL)firstTime { NSLog(@"loaded"); } TTURLRequestModel (singlePostModel) - (void)requestDidFinishLoad:(TTURLRequest*)request { //doing something [super requestDidFinishLoad:request]; } first i thought "didLoadModel" gets called after requestDidFinishLoad was called, but its before. So, how can i call a method in my TTModelViewController after request is finished loading? is there a method that already does that and i only have to overwrite this? or something else? thanks // if knowbody knows how to do this with three20, anybody can tell me how to do this in general?

    Read the article

  • How to save objects using Multi-Threading in Core Data?

    - by Konstantin
    I'm getting some data from the web service and saving it in the core data. This workflow looks like this: get xml feed go over every item in that feed, create a new ManagedObject for every feed item download some big binary data for every item and save it into ManagedObject call [managedObjectContext save:] Now, the problem is of course the performance - everything runs on the main thread. I'd like to re-factor as much as possible to another thread, but I'm not sure where I should start. Is it OK to put everything (1-4) to the separate thread?

    Read the article

  • How do i set and get UIButtons' tag?

    - by Sam Jarman
    How do i set a tag for a button programmatically? I later want to compare to tags for a conclusion ive tried this -(IBAction)buttonPressed:(id)sender{ NSLog(@"%d", [sender tag]); } but that just crashes the app.... :( any other ideas? Cheers Guys Sam

    Read the article

< Previous Page | 159 160 161 162 163 164 165 166 167 168 169 170  | Next Page >