Author Archive

ad view(inmobi): corona SDK

Creating adview using inmobi in corona is so simple. First register your app in inmobi. Then you will get an appID.

–==================================================================================================
local adNetwork = “inmobi”
local appID = enter your appId here as a stirng (eg:”430bbd07443248c5f69cdebac5433876″)
local ads = require “ads”
ads.init( adNetwork, appID, adListener )

local sysModel = system.getInfo(“model”)
local sysEnv = system.getInfo(“environment”)

local showAd = function( adType )
local adX, adY = 0, 0
ads.show( adType, { x=adX, y=adY, interval=60, testMode=true } )    – standard interval for “inneractive” is 60 seconds
end

if sysEnv ~= “simulator” then
showAd( “banner” )
end
–==================================================================================================

Incoming search terms:

  • corona saving to sql

How to renames a file or directory : corona SDK

The following lines of code will help you to renames a file or directory in a corona SDK project:

– if there is no such file, you will get the following the message in the console.

The following lines of code will do :

You can change/disable the highlight color of a table cell using the following codes…

Incoming search terms:

  • disable determine cell xcode
  • how to highlight a table cell with an image in xcode
  • xcode highlight a table cell using code
  • xcode remove selection from table
  • xcode table change selection color ios 6

You can use the following lines of code to check whether an image is in the app bundle or not in Xcode :

Incoming search terms:

  • xcode check to see if image exist

How to draw a line using Quartz 2D : XCode

You can use this to draw lines, shapes, graphs etc. from within your Xcode app. First of all, import QuartzCore.framework to the project.

Create a UIView subclass file, name it ‘drawClass’.

In drawClass.m :

There will be a ‘- (void)drawRect:(CGRect)rect’ function in the .m file. Override it using the following :

In viewController.m

Inside viewDidLoad method, create an object of drawClass and call it.

Build and run. This will draw a line on your viewController page.

Incoming search terms:

  • xcode quartz draw many line
  • color the shapes xcode
  • xcode mac app quartz draw line
  • xcode draw line in viewcontroller
  • line graph xcode
  • ios viewcontroller 2d drawing
  • how to draw the line in xcode
  • how to draw a line in ios xcode
  • drawline xcode
  • drawing shapes xcode

How to put one div in front of a other : HTML

For this, just do as follows.

1: Create a scaleFactor:

local scale_factor = 0.2;

2: When you want to zoom out, do :

Your_object:scale(scale_factor,scale_factor)

3: When you want to zoom in, do :

Your_object:scale(1/scale_factor,1/scale_factor)

There are types of rendering modes in corona SDK physics engine. The rendering modes are very much useful for the developers. Here I’ll show you how to choose any of these 3 rendering modes.

Code:

physics.setDrawMode( "debug" )    -- It will show collision engine outlines only.
physics.setDrawMode( "hybrid" )   -- It overlays collision outlines on normal Corona objects.
physics.setDrawMode( "normal" )  -- It is the default Corona renderer, with no collision outlines.

(Note: You can change the mode at any time, if you want)

as simple as that… :)

Page 1 of 912345...Last »