Cocoa Archives

How to Execute Javascript in UIWebView?

It is possible to execute javascript codes on the webpage loaded in a UIWebView. We can use stringByEvaluatingJavaScriptFromString: method of UIWebView object for this.

This method can be used once the url has been loaded in the web view as follows :

Incoming search terms:

  • Cocoa|Web eCommerce iOS Android ArduinoandSEO
  • will jquery work in uiwebview on ios

Restoring inapp purchases in ios

Adding delay between execution of two lines

Incoming search terms:

  • swipe uitableviewcell menu

//for the scrollview set the below property

Incoming search terms:

  • uiscrollview setautoresizessubviews
  • scrollview subview resize

Incoming search terms:

  • ios hide pickerview on didselectrow

The common undefined symbol error appearing while integrating test flight will be something like the following :

Undefined symbols for architecture armv7s:

“_deflateInit_”, referenced from:

_compress_data in libTestFlight.a(tf_compression.o)

“_deflateEnd”, referenced from:

_compress_data in libTestFlight.a(tf_compression.o)

“_deflate”, referenced from:

_compress_data in libTestFlight.a(tf_compression.o)

ld: symbol(s) not found for architecture armv7s

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

The fix for this issue is simple.

Goto the build phases of the target for which the issue is appearing. In the link binary with libraries section, use the ‘+’ button at the bottom to add a new library. In the dialog box which appears, search for libz.dylib . You will see the library in the list. Select that and press the ‘Add’ button.

Now perform a build clean for the project and you are done.

Build the app and the issue will be fixed.

Incoming search terms:

  • _compress_data in libtestflight a(tf_compression o)
  • cclocation cocos2d-x
  • cocos2dx ios6 fadeout problem
  • how to make dialog box using cocos2dx
  • _deflate referenced from testflight

We can get the child view controllers of a view controller using the childViewControllers property of the view controller.

If we are in a view controller class, if we want to get its child view controllers, then we can use the following code :

self.childViewControllers;

This will return an array of view controllers that are the child of the current view controller.

If there are no child view controllers of the current view controller, then the array will be empty.

 

If we are to get the child view controllers of a navigation controller, we can use the following code :

self.navigationController.childViewControllers;

Incoming search terms:

  • current childview controller
  • xcode get child of navigation controller

It is possible to pass a single parameter to performSelector: method in Xcode using the following method :

 

[self performSelector:@selector(selectorNamewithArg:) withObject:param];

 

But what to do if we have to pass multiple parameters? There is a way to pass upto two parameters to the performSelector: method. It can be implemented using the following method :

 

[self performSelector:@selector(selectorNamewithArg1: Arg2:) withObject:param1 withObject:param2];

 

Here, two parameters are passed to the selector method.

 

Doing Currency Conversion in XCode iPhone

//goto the following link download the DDUnitconverter  folder and copy it into your project

https://github.com/davedelong/DDUnitConverter

float amount =22.0f;

DDUnitConverter *converter = [DDUnitConverter currencyUnitConverter];

NSNumber *nsamount = [NSNumber numberWithFloat:amount];

NSNumber *result =  [converter convertNumber:nsamount fromUnit:DDCurrencyUnitEuro toUnit:DDCurrencyUnitUSDollar];//converts EURO to USD

Incoming search terms:

  • xcode currency converter tutorial ios
Page 1 of 1812345...10...Last »